Skip to main content
Go to Latest
class JavaScriptTypeBuilder
import { JavaScriptTypeBuilder } from "https://deno.land/x/openbox@1.1.5/deps.ts";

Methods

AsyncIterator<T extends TSchema>(items: T, options?: SchemaOptions): TAsyncIterator<T>

[JavaScript] Creates a AsyncIterator type

Awaited<T extends TSchema>(schema: T, options?: SchemaOptions): TAwaited<T>

[JavaScript] Constructs a type by recursively unwrapping Promise types

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

[JavaScript] Creates a BigInt type

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

[JavaScript] Creates a Constructor type

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

[JavaScript] Extracts the ConstructorParameters from the given Constructor type

Date(options?: DateOptions): TDate

[JavaScript] Creates a Date type

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

[JavaScript] Creates a Function type

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

[JavaScript] Extracts the InstanceType from the given Constructor type

Iterator<T extends TSchema>(items: T, options?: SchemaOptions): TIterator<T>

[JavaScript] Creates an Iterator type

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

[JavaScript] Extracts the Parameters from the given Function type

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

[JavaScript] Creates a Promise type

deprecated
RegEx(regex: RegExp, options?: SchemaOptions): TString
RegExp(pattern: string, options?: SchemaOptions): TString

[JavaScript] Creates a String type from a Regular Expression pattern

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

[JavaScript] Creates a String type from a Regular Expression

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

[JavaScript] Extracts the ReturnType from the given Function type

[JavaScript] Creates a Symbol type

[JavaScript] Creates a Uint8Array type

[JavaScript] Creates a Undefined type

[JavaScript] Creates a Void type