yaschema
    Preparing search index...

    Type Alias NumberSubtypeArray<T>

    NumberSubtypeArray: T[] & {
        checked: (value: number) => T | undefined;
        checkedArray: (...values: number[]) => T[];
        exclude: <ExcludeT extends T>(
            ...excludeArgs: ExcludeT[],
        ) => NumberSubtypeArray<Exclude<T, ExcludeT>>;
        has: (value: number) => boolean;
    }

    Type Parameters

    • T extends number

    Type declaration

    • checked: (value: number) => T | undefined

      If the specified value belongs to the array returns the value as the desired type

    • checkedArray: (...values: number[]) => T[]

      Filters the specified values, returning only those in this array, in O(1) time per value

    • exclude: <ExcludeT extends T>(
          ...excludeArgs: ExcludeT[],
      ) => NumberSubtypeArray<Exclude<T, ExcludeT>>

      Creates a new enhanced array type without the specified options

    • has: (value: number) => boolean

      Checks if the specified value belongs to the array in O(1) time