/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @format * @oncall react_native */ export interface ReadOnlyCountingSet extends Iterable { has(item: T): boolean; [Symbol.iterator](): Iterator; readonly size: number; count(item: T): number; forEach( callbackFn: ( this: ThisT, value: T, key: T, set: ReadOnlyCountingSet, ) => unknown, thisArg: ThisT, ): void; } export default class CountingSet implements ReadOnlyCountingSet { constructor(items?: Iterable); get size(): number; has(item: T): boolean; add(item: T): void; delete(item: T): void; keys(): Iterator; values(): Iterator; [Symbol.iterator](): Iterator; count(item: T): number; clear(): void; forEach( callbackFn: ( this: ThisT, value: T, key: T, set: ReadOnlyCountingSet, ) => unknown, thisArg: ThisT, ): void; toJSON(): unknown; }