import type { BiMultiMapHashed } from '@rimbu/bimultimap/custom'; import { type BiMultiMapBase } from '@rimbu/bimultimap/custom'; import type { HashSet } from '@rimbu/hashed'; import { HashMultiMapHashValue } from '@rimbu/multimap'; import type { Streamable } from '@rimbu/stream'; /** * A type-invariant immutable bi-directional MultiMap where keys and values have a * many-to-many mapping. Its keys and values are hashed. * See the [BiMultiMap documentation](https://rimbu.org/docs/collections/bimultimap) and the [HashBiMultiMap API documentation](https://rimbu.org/api/rimbu/bimultimap/HashBiMultiMap/interface) * @typeparam K - the key type * @typeparam V - the value type * @example * ```ts * const h1 = HashBiMultiMap.empty() * const h2 = HashBiMultiMap.of([1, 'a'], [1, 'b']) * ``` */ export interface HashBiMultiMap extends BiMultiMapBase { } export declare namespace HashBiMultiMap { /** * A non-empty type-invariant immutable bi-directional MultiMap where keys and values have a * many-to-many mapping. Its keys and values are hashed. * See the [BiMultiMap documentation](https://rimbu.org/docs/collections/bimultimap) and the [HashBiMultiMap API documentation](https://rimbu.org/api/rimbu/bimultimap/HashBiMultiMap/interface) * @typeparam K - the key type * @typeparam V - the value type */ interface NonEmpty extends BiMultiMapBase.NonEmpty, Omit, keyof BiMultiMapBase>, Streamable.NonEmpty<[K, V]> { } /** * The HashBiMultiMap's Context instance that serves as a factory for all related immutable instances and builders. * @typeparam UK - the upper type limit for key types for which this context can create instances * @typeparam UV - the upper type limit for value types for which this context can create instances */ interface Context extends BiMultiMapBase.Context { readonly typeTag: 'HashBiMultiMap'; } /** * A mutable `HashBiMultiMap` builder used to efficiently create new immutable instances. * See the [BiMultiMap documentation](https://rimbu.org/docs/collections/bimultimap) and the [HashBiMultiMap.Builder API documentation](https://rimbu.org/api/rimbu/bimultimap/HashBiMultiMap/Builder/interface) * @typeparam K - the key type * @typeparam V - the value type */ interface Builder extends BiMultiMapBase.Builder { } /** * Utility interface that provides higher-kinded types for this collection. */ interface Types extends BiMultiMapBase.Types { readonly context: HashBiMultiMap.Context; readonly normal: HashBiMultiMap; readonly nonEmpty: HashBiMultiMap.NonEmpty; readonly builder: HashBiMultiMap.Builder; readonly keyValueMultiMap: HashMultiMapHashValue; readonly valueKeyMultiMap: HashMultiMapHashValue; readonly keyMultiMapValues: HashSet; readonly valueMultiMapValues: HashSet; } } export declare const HashBiMultiMap: BiMultiMapHashed.Creators;