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

x/typebox/src/typebox.ts>ExtendedTypeBuilder

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

Methods

BigInt(options?: NumericOptions<bigint>): TBigInt

[Extended] Creates a BigInt type

Constructor<T extends TTuple<TSchema[]>, U extends TSchema>(
parameters: T,
returns: U,
options?: SchemaOptions,
): TConstructor<TTupleIntoArray<T>, U>

[Extended] Creates a Constructor type

Constructor<T extends TSchema[], U extends TSchema>(
parameters: [...T],
returns: U,
options?: SchemaOptions,
): TConstructor<T, U>

[Extended] Creates a Constructor type

ConstructorParameters<T extends TConstructor<any[], any>>(schema: T, options?: SchemaOptions): TConstructorParameters<T>

[Extended] Extracts the ConstructorParameters from the given Constructor type

Date(options?: DateOptions): TDate

[Extended] Creates a Date type

Function<T extends TTuple<TSchema[]>, U extends TSchema>(
parameters: T,
returns: U,
options?: SchemaOptions,
): TFunction<TTupleIntoArray<T>, U>

[Extended] Creates a Function type

Function<T extends TSchema[], U extends TSchema>(
parameters: [...T],
returns: U,
options?: SchemaOptions,
): TFunction<T, U>

[Extended] Creates a Function type

InstanceType<T extends TConstructor<any[], any>>(schema: T, options?: SchemaOptions): TInstanceType<T>

[Extended] Extracts the InstanceType from the given Constructor

Parameters<T extends TFunction<any[], any>>(schema: T, options?: SchemaOptions): TParameters<T>

[Extended] Extracts the Parameters from the given Function type

Promise<T extends TSchema>(item: T, options?: SchemaOptions): TPromise<T>

[Extended] Creates a Promise type

RegEx(regex: RegExp, options?: SchemaOptions): TString

[Extended] Creates a regular expression type

ReturnType<T extends TFunction<any[], any>>(schema: T, options?: SchemaOptions): TReturnType<T>

[Extended] Extracts the ReturnType from the given Function

[Extended] Creates a Symbol type

[Extended] Creates a Uint8Array type

[Extended] Creates a Undefined type

[Extended] Creates a Void type