Skip to main content
Module

x/wackford/discordeno.ts>hasProperty

The wackiest Discord bot framework for Deno powered by Discordeno
Go to Latest
function hasProperty
Re-export
import { hasProperty } from "https://deno.land/x/wackford@v0.0.4/discordeno.ts";

TS save way to check if a property exists in an object

Type Parameters

T extends { }
optional
Y extends PropertyKey = string

Parameters

obj: T
prop: Y

Returns

obj is T & Record<Y, unknown>