Interface IRandomGenerator

interface IRandomGenerator {
    array<T>(
        schema: Omit<IArray, "items"> & {
            element: (index: number, count: number) => T;
        },
    ): T[];
    bigint(schema: IInteger): bigint;
    boolean(): undefined | boolean;
    byte(): string;
    date(props?: { maximum?: number; minimum?: number }): string;
    datetime(props?: { maximum?: number; minimum?: number }): string;
    duration(): string;
    email(): string;
    hostname(): string;
    idnEmail(): string;
    idnHostname(): string;
    integer(schema: IInteger): number;
    ipv4(): string;
    ipv6(): string;
    iri(): string;
    iriReference(): string;
    jsonPointer(): string;
    number(schema: INumber): number;
    password(): string;
    pattern(regex: RegExp): string;
    regex(): string;
    relativeJsonPointer(): string;
    string(schema: IString): string;
    time(): string;
    uri(): string;
    uriReference(): string;
    uriTemplate(): string;
    url(): string;
    uuid(): string;
}

Methods

  • Type Parameters

    • T

    Parameters

    • schema: Omit<IArray, "items"> & { element: (index: number, count: number) => T }

    Returns T[]

  • Parameters

    • Optionalprops: { maximum?: number; minimum?: number }

    Returns string

  • Parameters

    • Optionalprops: { maximum?: number; minimum?: number }

    Returns string