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

x/typebox/src/typebox.ts>StandardTypeBuilder#Pick

JSON Schema Type Builder with Static Type Resolution for TypeScript
Go to Latest
method StandardTypeBuilder.prototype.Pick
import { StandardTypeBuilder } from "https://deno.land/x/typebox@0.26.0-dev.1/src/typebox.ts";

[Standard] Creates a mapped type whose keys are picked from the given type

Type Parameters

T extends TSchema
K extends (keyof Static<T>)[]

Parameters

schema: T
keys: readonly [...K]
optional
options: SchemaOptions

Returns

TPick<T, K[number]>

[Standard] Creates a mapped type whose keys are picked from the given type

Type Parameters

T extends TSchema
K extends TUnion<TLiteral<string>[]>

Parameters

schema: T
keys: K
optional
options: SchemaOptions