Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

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

Json Schema Type Builder with Static Type Resolution for TypeScript
Go to Latest
function HasPropertyKey
import { HasPropertyKey } from "https://deno.land/x/typebox@0.32.23/src/value/guard/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>