Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/typebox_deno/src/value/guard.ts>HasPropertyKey

JSON Schema Type Builder with Static Type Resolution for TypeScript
Latest
function HasPropertyKey
import { HasPropertyKey } from "https://deno.land/x/typebox_deno@0.31.22/src/value/guard.ts";

Returns true if this value has this property key

Type Parameters

K extends PropertyKey

Parameters

value: Record<any, unknown>
key: K

Returns

value is ObjectType & Record<K, unknown>