UNPKG

@woosh/meep-engine

Version:

Pure JavaScript game engine. Fully featured and production ready.

34 lines (22 loc) 713 B
export class HashSet<T> { constructor({ keyHashFunction, keyEqualityFunction, capacity }: { keyHashFunction: (k: T) => number, keyEqualityFunction: (a: T, b: T) => boolean, capacity?: number }) constructor() get size(): number add(value: T): this has(value: T): boolean get(value: T): T | undefined delete(value: T): boolean clear(): void forEach(callback: (value: T, key: T, set: this) => any, thisArg?: any): void [Symbol.iterator](): IterableIterator<T> values(): IterableIterator<T> keys(): IterableIterator<T> }