@typia/website
    Preparing search index...

    Tuple type info.

    interface ITuple {
        additionalItems?: boolean | OpenApi.IJsonSchema;
        deprecated?: boolean;
        description?: string;
        example?: any;
        examples?: Record<string, any>;
        maxItems?: number;
        minItems?: number;
        prefixItems: OpenApi.IJsonSchema[];
        title?: string;
        type: "array";
        uniqueItems?: boolean;
    }

    Hierarchy (View Summary)

    Index

    Properties

    additionalItems?: boolean | OpenApi.IJsonSchema

    Additional items.

    The additionalItems means the type schema info of the additional items after the prefixItems. In the TypeScript, if there's a type [T1, T2, ...TO[]], the ...TO[] is represented by the additionalItems.

    By the way, if you configure the additionalItems as true, it means the additional items are not restricted. They can be any type, so that it is equivalent to the TypeScript type [T1, T2, ...any[]].

    Otherwise configure the additionalItems as the IJsonSchema, it means the additional items must follow the type schema info. Therefore, it is equivalent to the TypeScript type [T1, T2, ...TO[]].

    deprecated?: boolean

    Whether the type is deprecated or not.

    description?: string

    Detailed description of the schema.

    example?: any

    Example value.

    examples?: Record<string, any>

    List of example values as key-value pairs.

    maxItems?: number

    Maximum items restriction.

    Restriction of maximum number of items in the tuple.

    minItems?: number

    Minimum items restriction.

    Restriction of minimum number of items in the tuple.

    prefixItems: OpenApi.IJsonSchema[]

    Prefix items.

    The prefixItems means the type schema info of the prefix items in the tuple type. In the TypeScript, it is expressed as [T1, T2].

    If you want to express [T1, T2, ...TO[]] type, you can configure the ...TO[] through the additionalItems property.

    title?: string

    Title of the schema.

    type: "array"

    Discriminator value of the type.

    Note that, the tuple type cannot be distinguished with IArray type just by this discriminator property.

    To check whether the type is tuple or array, you have to check the existence of IArray.items or ITuple.prefixItems properties.

    uniqueItems?: boolean

    Unique items restriction.

    If this property value is true, target tuple must have unique items.