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

x/typebox/src/typebox.ts>JsonTypeBuilder#Omit

Json Schema Type Builder with Static Type Resolution for TypeScript
Go to Latest
method JsonTypeBuilder.prototype.Omit
import { JsonTypeBuilder } from "https://deno.land/x/typebox@0.31.20/src/typebox.ts";

[Json] Constructs a type whose keys are omitted from the given type

Type Parameters

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

Parameters

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

Returns

TOmit<T, K[number]>

[Json] Constructs a type whose keys are omitted from the given type

Type Parameters

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

Parameters

schema: T
keys: K
optional
options: SchemaOptions

[Json] Constructs a type whose keys are omitted from the given type

Type Parameters

T extends TSchema
K extends TLiteral<string>

Parameters

schema: T
key: K
optional
options: SchemaOptions

Returns

TOmit<T, K["const"]>

[Json] Constructs a type whose keys are omitted from the given type

Parameters

schema: T
key: K
optional
options: SchemaOptions

[Json] Constructs a type whose keys are omitted from the given type

Type Parameters

T extends TSchema
K extends TNever

Parameters

schema: T
key: K
optional
options: SchemaOptions

Returns

TOmit<T, never>