神岛 API 文档 - ArenaPro版
    Preparing search index...

    Interface ReadonlySet<T>

    interface ReadonlySet<T> {
        size: number;
        "[iterator]"(): SetIterator<T>;
        "[iterator]"(): IterableIterator<T>;
        entries(): SetIterator<[T, T]>;
        entries(): IterableIterator<[T, T]>;
        forEach(
            callbackfn: (value: T, value2: T, set: ReadonlySet<T>) => void,
            thisArg?: any,
        ): void;
        forEach(
            callbackfn: (value: T, value2: T, set: ReadonlySet<T>) => void,
            thisArg?: any,
        ): void;
        has(value: T): boolean;
        has(value: T): boolean;
        keys(): SetIterator<T>;
        keys(): IterableIterator<T>;
        values(): SetIterator<T>;
        values(): IterableIterator<T>;
    }

    Type Parameters

    • T
    Index

    Properties

    size: number

    Methods

    • Returns an iterable of [v,v] pairs for every value v in the set.

      Returns SetIterator<[T, T]>

    • Returns an iterable of [v,v] pairs for every value v in the set.

      Returns IterableIterator<[T, T]>

    • Parameters

      • callbackfn: (value: T, value2: T, set: ReadonlySet<T>) => void
      • OptionalthisArg: any

      Returns void

    • Parameters

      • callbackfn: (value: T, value2: T, set: ReadonlySet<T>) => void
      • OptionalthisArg: any

      Returns void

    • Parameters

      • value: T

      Returns boolean

    • Parameters

      • value: T

      Returns boolean

    • Despite its name, returns an iterable of the values in the set.

      Returns SetIterator<T>

    • Despite its name, returns an iterable of the values in the set,

      Returns IterableIterator<T>