@typia/website
    Preparing search index...

    Map of custom generators for different data types.

    This interface allows customization of random generation for specific types when they have certain schema properties or constraints.

      const generator: Partial<IRandomGenerator> = {
    string: (schema) => {
    if ((schema as any)["x-typia-monetary"] === "dollar") {
    return "$" + Math.floor(Math.random() * 1000);
    }
    return "default-string";
    },
    number: (schema) => {
    if ((schema as any)["x-typia-powerOf"] !== undefined) {
    const powerOf = (schema as any)["x-typia-powerOf"];
    return Math.pow(powerOf, Math.random() * 10 + 1);
    }
    return Math.random() * 100;
    }
    };
    interface CustomMap {
        array?: <T>(
            schema: Omit<IArray, "items"> & {
                element: (index: number, count: number) => T;
            } & Record<string, any>,
        ) => T[];
        bigint?: (schema: IInteger & Record<string, any>) => bigint;
        boolean?: (schema: Record<string, any>) => undefined | boolean;
        integer?: (schema: IInteger & Record<string, any>) => number;
        number?: (schema: INumber & Record<string, any>) => number;
        string?: (schema: IString & Record<string, any>) => string;
    }
    Index

    Properties

    array?: <T>(
        schema: Omit<IArray, "items"> & {
            element: (index: number, count: number) => T;
        } & Record<string, any>,
    ) => T[]

    Custom array generator that can handle special array constraints based on schema properties.

    bigint?: (schema: IInteger & Record<string, any>) => bigint

    Custom bigint generator that can handle special bigint constraints based on schema properties.

    boolean?: (schema: Record<string, any>) => undefined | boolean

    Custom boolean generator that can handle special boolean constraints based on schema properties.

    integer?: (schema: IInteger & Record<string, any>) => number

    Custom integer generator that can handle special integer constraints based on schema properties.

    number?: (schema: INumber & Record<string, any>) => number

    Custom number generator that can handle special number constraints based on schema properties.

    string?: (schema: IString & Record<string, any>) => string

    Custom string generator that can handle special string formats based on schema properties.