Kfg Documentation
    Preparing search index...

    Interface TObject<T>

    interface TObject<T extends TProperties = TProperties> {
        "[Hint]"?: string;
        "[Kind]": "Object";
        "[OptionalKind]"?: string;
        "[ReadonlyKind]"?: string;
        $id?: string;
        $schema?: string;
        additionalProperties?: TAdditionalProperties;
        default?: any;
        description?: string;
        examples?: any;
        maxProperties?: number;
        minProperties?: number;
        params: unknown[];
        properties: T;
        readOnly?: boolean;
        required: UnionToTuple<
            Extract<
                keyof {
                    [Key in string
                    | number
                    | symbol as T[Key] extends TOptional<T[Key]> ? never : Key]: T[Key]
                },
                string,
            >,
            [],
            UnionLast<
                Extract<
                    keyof {
                        [Key in string
                        | number
                        | symbol as T[Key] extends TOptional<T[Key]> ? never : Key]: T[Key]
                    },
                    string,
                >,
            >,
        > extends []
            ? undefined
            : UnionToTuple<
                Extract<
                    keyof {
                        [Key in string
                        | number
                        | symbol as T[Key] extends TOptional<T[Key]> ? never : Key]: T[Key]
                    },
                    string,
                >,
                [],
                UnionLast<
                    Extract<
                        keyof {
                            [Key in string
                            | number
                            | symbol as T[Key] extends TOptional<T[Key]> ? never : Key]: T[Key]
                        },
                        string,
                    >,
                >,
            >;
        static: Evaluate<
            Readonly<
                Partial<
                    Pick<
                        {
                            [K in string
                            | number
                            | symbol]: (T[K] & { params: unknown[] })["static"]
                        },
                        ReadonlyOptionalPropertyKeys<T>,
                    >,
                >,
            > & Readonly<
                Pick<
                    {
                        [K in string
                        | number
                        | symbol]: (T[K] & { params: unknown[] })["static"]
                    },
                    ReadonlyPropertyKeys<T>,
                >,
            > & Partial<
                Pick<
                    {
                        [K in string
                        | number
                        | symbol]: (T[K] & { params: unknown[] })["static"]
                    },
                    OptionalPropertyKeys<T>,
                >,
            > & Required<
                Pick<
                    {
                        [K in string
                        | number
                        | symbol]: (T[K] & { params: unknown[] })["static"]
                    },
                    Exclude<
                        keyof T,
                        | ReadonlyOptionalPropertyKeys<T>
                        | ReadonlyPropertyKeys<T>
                        | OptionalPropertyKeys<T>,
                    >,
                >,
            >,
        >;
        title?: string;
        type: "object";
        writeOnly?: boolean;
        [prop: string]: any;
    }

    Type Parameters

    • T extends TProperties = TProperties

    Hierarchy (View Summary)

    Indexable

    • [prop: string]: any
    Index

    Properties

    "[Hint]"?: string
    "[Kind]": "Object"
    "[OptionalKind]"?: string
    "[ReadonlyKind]"?: string
    $id?: string

    Id for this schema

    $schema?: string
    additionalProperties?: TAdditionalProperties

    Additional property constraints for this object

    default?: any

    Default value for this schema

    description?: string

    Description of this schema

    examples?: any

    Example values matching this schema

    maxProperties?: number

    The maximum number of properties allowed on this object

    minProperties?: number

    The minimum number of properties allowed on this object

    params: unknown[]
    properties: T
    readOnly?: boolean

    Optional annotation for readOnly

    required: UnionToTuple<
        Extract<
            keyof {
                [Key in string
                | number
                | symbol as T[Key] extends TOptional<T[Key]> ? never : Key]: T[Key]
            },
            string,
        >,
        [],
        UnionLast<
            Extract<
                keyof {
                    [Key in string
                    | number
                    | symbol as T[Key] extends TOptional<T[Key]> ? never : Key]: T[Key]
                },
                string,
            >,
        >,
    > extends []
        ? undefined
        : UnionToTuple<
            Extract<
                keyof {
                    [Key in string
                    | number
                    | symbol as T[Key] extends TOptional<T[Key]> ? never : Key]: T[Key]
                },
                string,
            >,
            [],
            UnionLast<
                Extract<
                    keyof {
                        [Key in string
                        | number
                        | symbol as T[Key] extends TOptional<T[Key]> ? never : Key]: T[Key]
                    },
                    string,
                >,
            >,
        >
    static: Evaluate<
        Readonly<
            Partial<
                Pick<
                    {
                        [K in string
                        | number
                        | symbol]: (T[K] & { params: unknown[] })["static"]
                    },
                    ReadonlyOptionalPropertyKeys<T>,
                >,
            >,
        > & Readonly<
            Pick<
                {
                    [K in string
                    | number
                    | symbol]: (T[K] & { params: unknown[] })["static"]
                },
                ReadonlyPropertyKeys<T>,
            >,
        > & Partial<
            Pick<
                {
                    [K in string
                    | number
                    | symbol]: (T[K] & { params: unknown[] })["static"]
                },
                OptionalPropertyKeys<T>,
            >,
        > & Required<
            Pick<
                {
                    [K in string
                    | number
                    | symbol]: (T[K] & { params: unknown[] })["static"]
                },
                Exclude<
                    keyof T,
                    | ReadonlyOptionalPropertyKeys<T>
                    | ReadonlyPropertyKeys<T>
                    | OptionalPropertyKeys<T>,
                >,
            >,
        >,
    >
    title?: string

    Title of this schema

    type: "object"
    writeOnly?: boolean

    Optional annotation for writeOnly