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

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

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

[Json] Returns an Indexed property type for the given keys

Type Parameters

T extends TArray
K extends TNumber

Parameters

schema: T
keys: K
optional
options: SchemaOptions

[Json] Returns an Indexed property type for the given keys

Type Parameters

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

Parameters

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

[Json] Returns an Indexed property type for the given keys

Type Parameters

T extends TTuple
K extends TNumber

Parameters

schema: T
keys: K
optional
options: SchemaOptions

[Json] Returns an Indexed property type for the given keys

Parameters

schema: T
keys: K
optional
options: SchemaOptions

[Json] Returns an Indexed property type for the given keys

Parameters

schema: T
keys: K
optional
options: SchemaOptions

Returns

TIndex<T, [K["const"]]>

[Json] Returns an Indexed property type for the given keys

Type Parameters

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

Parameters

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

[Json] Returns an Indexed property type for the given keys

Parameters

schema: T
keys: K
optional
options: SchemaOptions

[Json] Returns an Indexed property type for the given keys

Type Parameters

T extends TSchema
K extends TSchema

Parameters

schema: T
key: K
optional
options: SchemaOptions