UNPKG

@cch137/emitter

Version:

`@cch137/emitter` is a versatile event emitter package designed to work seamlessly in both browser and Node.js environments. It provides a simple yet powerful interface for managing event-driven architecture in your applications.

21 lines 691 B
export default class Group<T> extends Array<T> { static readonly Group: typeof Group; constructor(...items: T[]); add(...items: T[]): this; delete(item: T): boolean; deleteLast(item: T): boolean; deleteOne(item: T): boolean; has(item: T): boolean; clear(): void; } export { Group }; export declare class Collection<K = any, V = any> extends Map<K, Group<V>> { group(key: K): Group<V>; once(key: K): Group<V> | undefined; trim(): void; } export declare class WeakCollection<K extends WeakKey = object, V = any> extends WeakMap<K, Group<V>> { group(key: K): Group<V>; once(key: K): Group<V> | undefined; } //# sourceMappingURL=group.d.ts.map