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

x/typebox/src/typebox.ts>TypeGuard.TKindOf

Json Schema Type Builder with Static Type Resolution for TypeScript
Go to Latest
function TypeGuard.TKindOf
import { TypeGuard } from "https://deno.land/x/typebox@0.31.20/src/typebox.ts";
const { TKindOf } = TypeGuard;

Returns true if the given value is a TKind with the given name.

Type Parameters

T extends string

Parameters

schema: unknown
kind: T

Returns

schema is Record<PropertyKey, unknown> & { [Kind]: T; }