import { inspect } from 'node:util'; export type Primitive = string | number | boolean | null | undefined; export type PrimitiveProjection = (value: T) => Primitive; /** * A set implementation that can hold complex values (like Buffer). * * The user must provide a projection function which returns a primitive * representation of the complex value. This function must be 1-to-1 mapping. * * Look at `../complex.test.ts` for usage examples. */ export declare class ComplexSet implements Set { private readonly _projection; private readonly _values; constructor(_projection: PrimitiveProjection, values?: Iterable | null); toString(): string; toJSON(): T[] | { size: number; }; [inspect.custom](): string; add(value: T): this; clear(): void; delete(value: T): boolean; forEach(callbackfn: (value: T, value2: T, set: Set) => void, thisArg?: any): void; has(value: T): boolean; get size(): number; [Symbol.iterator](): SetIterator; entries(): SetIterator<[T, T]>; keys(): SetIterator; values(): SetIterator; get [Symbol.toStringTag](): string; union(other: ReadonlySetLike): Set; intersection(other: ReadonlySetLike): Set; difference(other: ReadonlySetLike): Set; symmetricDifference(other: ReadonlySetLike): Set; isSubsetOf(other: ReadonlySetLike): boolean; isSupersetOf(other: ReadonlySetLike): boolean; isDisjointFrom(other: ReadonlySetLike): boolean; } export type ComplexSetConstructor = new (values?: Iterable | null) => ComplexSet; /** * Create a subclass of ComplexSet with predefined projection function. */ export declare const makeSet: (projection: PrimitiveProjection) => ComplexSetConstructor; /** * A map implementation that can hold complex values (like Buffer) as keys. * The user must provide a projection function for map keys which returns a primitive * representation of the complex value. This function must be 1-to-1 mapping. * Look at `../complex.test.ts` for usage examples. */ export declare class ComplexMap implements Map { private readonly _keyProjection; private readonly _keys; private readonly _values; constructor(_keyProjection: PrimitiveProjection, entries?: readonly (readonly [K, V])[] | null); toString(): string; toJSON(): V[] | { size: number; }; [inspect.custom](): string; clear(): void; delete(key: K): boolean; forEach(callbackfn: (value: V, key: K, map: Map) => void, thisArg?: any): void; get(key: K): V | undefined; has(key: K): boolean; set(key: K, value: V): this; get size(): number; [Symbol.iterator](): SetIterator<[K, V]>; entries(): SetIterator<[K, V]>; keys(): SetIterator; values(): SetIterator; mapValues(mapper: (v: V, k: K) => R): ComplexMap; get [Symbol.toStringTag](): string; } export type ComplexMapConstructor = new (entries?: readonly (readonly [K, V])[] | null) => ComplexMap; /** * Create a subclass of ComplexMap with predefined key projection function. */ export declare const makeMap: (keyProjection: PrimitiveProjection) => ComplexMapConstructor; //# sourceMappingURL=complex.d.ts.map