<K>(key: K): <V>(self: MutableHashMap<K, V>) => MutableHashMap<K, V>
<K, V>(self: MutableHashMap<K, V>, key: K): MutableHashMap<K, V>Removes the specified key from the MutableHashMap, mutating the map in place. If the key doesn't exist, the map remains unchanged.
When to use
Use to delete one key from a mutable hash map in place.
Example (Removing a key)
import { MutableHashMap } from "effect"
const map = MutableHashMap.make(
["key1", 42],
["key2", 100],
["key3", 200]
)
console.log(MutableHashMap.size(map)) // 3
// Remove existing key
MutableHashMap.remove(map, "key2")
console.log(MutableHashMap.size(map)) // 2
console.log(MutableHashMap.has(map, "key2")) // false
// Remove non-existent key (no effect)
MutableHashMap.remove(map, "nonexistent")
console.log(MutableHashMap.size(map)) // 2
// Pipe-able version
const removeKey = MutableHashMap.remove("key1")
removeKey(map)
console.log(MutableHashMap.size(map)) // 1export const const remove: {
<K>(key: K): <V>(
self: MutableHashMap<K, V>
) => MutableHashMap<K, V>
<K, V>(
self: MutableHashMap<K, V>,
key: K
): MutableHashMap<K, V>
}
Removes the specified key from the MutableHashMap, mutating the map in place.
If the key doesn't exist, the map remains unchanged.
When to use
Use to delete one key from a mutable hash map in place.
Example (Removing a key)
import { MutableHashMap } from "effect"
const map = MutableHashMap.make(
["key1", 42],
["key2", 100],
["key3", 200]
)
console.log(MutableHashMap.size(map)) // 3
// Remove existing key
MutableHashMap.remove(map, "key2")
console.log(MutableHashMap.size(map)) // 2
console.log(MutableHashMap.has(map, "key2")) // false
// Remove non-existent key (no effect)
MutableHashMap.remove(map, "nonexistent")
console.log(MutableHashMap.size(map)) // 2
// Pipe-able version
const removeKey = MutableHashMap.remove("key1")
removeKey(map)
console.log(MutableHashMap.size(map)) // 1
remove: {
<function (type parameter) K in <K>(key: K): <V>(self: MutableHashMap<K, V>) => MutableHashMap<K, V>K>(key: Kkey: function (type parameter) K in <K>(key: K): <V>(self: MutableHashMap<K, V>) => MutableHashMap<K, V>K): <function (type parameter) V in <V>(self: MutableHashMap<K, V>): MutableHashMap<K, V>V>(self: MutableHashMap<K, V>(parameter) self: {
backing: Map<K, V>;
buckets: Map<number, NonEmptyArray<K>>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
self: interface MutableHashMap<out K, out V>A mutable hash map that stores key-value pairs and supports both referential
and Effect structural equality.
When to use
Use as a mutable key-value map when in-place updates are acceptable and keys
may rely on Effect structural equality.
Details
Operations mutate the map in place. Keys that implement Equal / Hash can
be looked up structurally; other keys use normal JavaScript reference or
primitive equality.
Example (Using a mutable hash map)
import { MutableHashMap } from "effect"
// Create a mutable hash map with string keys and number values
const map: MutableHashMap.MutableHashMap<string, number> = MutableHashMap
.empty()
// Add some data
MutableHashMap.set(map, "count", 42)
MutableHashMap.set(map, "total", 100)
// Use as iterable
for (const [key, value] of map) {
console.log(`${key}: ${value}`)
}
// Output:
// count: 42
// total: 100
// Convert to array
const entries = Array.from(map)
console.log(entries) // [["count", 42], ["total", 100]]
MutableHashMap<function (type parameter) K in <K>(key: K): <V>(self: MutableHashMap<K, V>) => MutableHashMap<K, V>K, function (type parameter) V in <V>(self: MutableHashMap<K, V>): MutableHashMap<K, V>V>) => interface MutableHashMap<out K, out V>A mutable hash map that stores key-value pairs and supports both referential
and Effect structural equality.
When to use
Use as a mutable key-value map when in-place updates are acceptable and keys
may rely on Effect structural equality.
Details
Operations mutate the map in place. Keys that implement Equal / Hash can
be looked up structurally; other keys use normal JavaScript reference or
primitive equality.
Example (Using a mutable hash map)
import { MutableHashMap } from "effect"
// Create a mutable hash map with string keys and number values
const map: MutableHashMap.MutableHashMap<string, number> = MutableHashMap
.empty()
// Add some data
MutableHashMap.set(map, "count", 42)
MutableHashMap.set(map, "total", 100)
// Use as iterable
for (const [key, value] of map) {
console.log(`${key}: ${value}`)
}
// Output:
// count: 42
// total: 100
// Convert to array
const entries = Array.from(map)
console.log(entries) // [["count", 42], ["total", 100]]
MutableHashMap<function (type parameter) K in <K>(key: K): <V>(self: MutableHashMap<K, V>) => MutableHashMap<K, V>K, function (type parameter) V in <V>(self: MutableHashMap<K, V>): MutableHashMap<K, V>V>
<function (type parameter) K in <K, V>(self: MutableHashMap<K, V>, key: K): MutableHashMap<K, V>K, function (type parameter) V in <K, V>(self: MutableHashMap<K, V>, key: K): MutableHashMap<K, V>V>(self: MutableHashMap<K, V>(parameter) self: {
backing: Map<K, V>;
buckets: Map<number, NonEmptyArray<K>>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
self: interface MutableHashMap<out K, out V>A mutable hash map that stores key-value pairs and supports both referential
and Effect structural equality.
When to use
Use as a mutable key-value map when in-place updates are acceptable and keys
may rely on Effect structural equality.
Details
Operations mutate the map in place. Keys that implement Equal / Hash can
be looked up structurally; other keys use normal JavaScript reference or
primitive equality.
Example (Using a mutable hash map)
import { MutableHashMap } from "effect"
// Create a mutable hash map with string keys and number values
const map: MutableHashMap.MutableHashMap<string, number> = MutableHashMap
.empty()
// Add some data
MutableHashMap.set(map, "count", 42)
MutableHashMap.set(map, "total", 100)
// Use as iterable
for (const [key, value] of map) {
console.log(`${key}: ${value}`)
}
// Output:
// count: 42
// total: 100
// Convert to array
const entries = Array.from(map)
console.log(entries) // [["count", 42], ["total", 100]]
MutableHashMap<function (type parameter) K in <K, V>(self: MutableHashMap<K, V>, key: K): MutableHashMap<K, V>K, function (type parameter) V in <K, V>(self: MutableHashMap<K, V>, key: K): MutableHashMap<K, V>V>, key: Kkey: function (type parameter) K in <K, V>(self: MutableHashMap<K, V>, key: K): MutableHashMap<K, V>K): interface MutableHashMap<out K, out V>A mutable hash map that stores key-value pairs and supports both referential
and Effect structural equality.
When to use
Use as a mutable key-value map when in-place updates are acceptable and keys
may rely on Effect structural equality.
Details
Operations mutate the map in place. Keys that implement Equal / Hash can
be looked up structurally; other keys use normal JavaScript reference or
primitive equality.
Example (Using a mutable hash map)
import { MutableHashMap } from "effect"
// Create a mutable hash map with string keys and number values
const map: MutableHashMap.MutableHashMap<string, number> = MutableHashMap
.empty()
// Add some data
MutableHashMap.set(map, "count", 42)
MutableHashMap.set(map, "total", 100)
// Use as iterable
for (const [key, value] of map) {
console.log(`${key}: ${value}`)
}
// Output:
// count: 42
// total: 100
// Convert to array
const entries = Array.from(map)
console.log(entries) // [["count", 42], ["total", 100]]
MutableHashMap<function (type parameter) K in <K, V>(self: MutableHashMap<K, V>, key: K): MutableHashMap<K, V>K, function (type parameter) V in <K, V>(self: MutableHashMap<K, V>, key: K): MutableHashMap<K, V>V>
} = import dualdual<
<function (type parameter) K in <K>(key: K): <V>(self: MutableHashMap<K, V>) => MutableHashMap<K, V>K>(key: Kkey: function (type parameter) K in <K>(key: K): <V>(self: MutableHashMap<K, V>) => MutableHashMap<K, V>K) => <function (type parameter) V in <V>(self: MutableHashMap<K, V>): MutableHashMap<K, V>V>(self: MutableHashMap<K, V>(parameter) self: {
backing: Map<K, V>;
buckets: Map<number, NonEmptyArray<K>>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
self: interface MutableHashMap<out K, out V>A mutable hash map that stores key-value pairs and supports both referential
and Effect structural equality.
When to use
Use as a mutable key-value map when in-place updates are acceptable and keys
may rely on Effect structural equality.
Details
Operations mutate the map in place. Keys that implement Equal / Hash can
be looked up structurally; other keys use normal JavaScript reference or
primitive equality.
Example (Using a mutable hash map)
import { MutableHashMap } from "effect"
// Create a mutable hash map with string keys and number values
const map: MutableHashMap.MutableHashMap<string, number> = MutableHashMap
.empty()
// Add some data
MutableHashMap.set(map, "count", 42)
MutableHashMap.set(map, "total", 100)
// Use as iterable
for (const [key, value] of map) {
console.log(`${key}: ${value}`)
}
// Output:
// count: 42
// total: 100
// Convert to array
const entries = Array.from(map)
console.log(entries) // [["count", 42], ["total", 100]]
MutableHashMap<function (type parameter) K in <K>(key: K): <V>(self: MutableHashMap<K, V>) => MutableHashMap<K, V>K, function (type parameter) V in <V>(self: MutableHashMap<K, V>): MutableHashMap<K, V>V>) => interface MutableHashMap<out K, out V>A mutable hash map that stores key-value pairs and supports both referential
and Effect structural equality.
When to use
Use as a mutable key-value map when in-place updates are acceptable and keys
may rely on Effect structural equality.
Details
Operations mutate the map in place. Keys that implement Equal / Hash can
be looked up structurally; other keys use normal JavaScript reference or
primitive equality.
Example (Using a mutable hash map)
import { MutableHashMap } from "effect"
// Create a mutable hash map with string keys and number values
const map: MutableHashMap.MutableHashMap<string, number> = MutableHashMap
.empty()
// Add some data
MutableHashMap.set(map, "count", 42)
MutableHashMap.set(map, "total", 100)
// Use as iterable
for (const [key, value] of map) {
console.log(`${key}: ${value}`)
}
// Output:
// count: 42
// total: 100
// Convert to array
const entries = Array.from(map)
console.log(entries) // [["count", 42], ["total", 100]]
MutableHashMap<function (type parameter) K in <K>(key: K): <V>(self: MutableHashMap<K, V>) => MutableHashMap<K, V>K, function (type parameter) V in <V>(self: MutableHashMap<K, V>): MutableHashMap<K, V>V>,
<function (type parameter) K in <K, V>(self: MutableHashMap<K, V>, key: K): MutableHashMap<K, V>K, function (type parameter) V in <K, V>(self: MutableHashMap<K, V>, key: K): MutableHashMap<K, V>V>(self: MutableHashMap<K, V>(parameter) self: {
backing: Map<K, V>;
buckets: Map<number, NonEmptyArray<K>>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
self: interface MutableHashMap<out K, out V>A mutable hash map that stores key-value pairs and supports both referential
and Effect structural equality.
When to use
Use as a mutable key-value map when in-place updates are acceptable and keys
may rely on Effect structural equality.
Details
Operations mutate the map in place. Keys that implement Equal / Hash can
be looked up structurally; other keys use normal JavaScript reference or
primitive equality.
Example (Using a mutable hash map)
import { MutableHashMap } from "effect"
// Create a mutable hash map with string keys and number values
const map: MutableHashMap.MutableHashMap<string, number> = MutableHashMap
.empty()
// Add some data
MutableHashMap.set(map, "count", 42)
MutableHashMap.set(map, "total", 100)
// Use as iterable
for (const [key, value] of map) {
console.log(`${key}: ${value}`)
}
// Output:
// count: 42
// total: 100
// Convert to array
const entries = Array.from(map)
console.log(entries) // [["count", 42], ["total", 100]]
MutableHashMap<function (type parameter) K in <K, V>(self: MutableHashMap<K, V>, key: K): MutableHashMap<K, V>K, function (type parameter) V in <K, V>(self: MutableHashMap<K, V>, key: K): MutableHashMap<K, V>V>, key: Kkey: function (type parameter) K in <K, V>(self: MutableHashMap<K, V>, key: K): MutableHashMap<K, V>K) => interface MutableHashMap<out K, out V>A mutable hash map that stores key-value pairs and supports both referential
and Effect structural equality.
When to use
Use as a mutable key-value map when in-place updates are acceptable and keys
may rely on Effect structural equality.
Details
Operations mutate the map in place. Keys that implement Equal / Hash can
be looked up structurally; other keys use normal JavaScript reference or
primitive equality.
Example (Using a mutable hash map)
import { MutableHashMap } from "effect"
// Create a mutable hash map with string keys and number values
const map: MutableHashMap.MutableHashMap<string, number> = MutableHashMap
.empty()
// Add some data
MutableHashMap.set(map, "count", 42)
MutableHashMap.set(map, "total", 100)
// Use as iterable
for (const [key, value] of map) {
console.log(`${key}: ${value}`)
}
// Output:
// count: 42
// total: 100
// Convert to array
const entries = Array.from(map)
console.log(entries) // [["count", 42], ["total", 100]]
MutableHashMap<function (type parameter) K in <K, V>(self: MutableHashMap<K, V>, key: K): MutableHashMap<K, V>K, function (type parameter) V in <K, V>(self: MutableHashMap<K, V>, key: K): MutableHashMap<K, V>V>
>(2, <function (type parameter) K in <K, V>(self: MutableHashMap<K, V>, key_: K): MutableHashMap<K, V>K, function (type parameter) V in <K, V>(self: MutableHashMap<K, V>, key_: K): MutableHashMap<K, V>V>(self: MutableHashMap<K, V>(parameter) self: {
backing: Map<K, V>;
buckets: Map<number, NonEmptyArray<K>>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
self: interface MutableHashMap<out K, out V>A mutable hash map that stores key-value pairs and supports both referential
and Effect structural equality.
When to use
Use as a mutable key-value map when in-place updates are acceptable and keys
may rely on Effect structural equality.
Details
Operations mutate the map in place. Keys that implement Equal / Hash can
be looked up structurally; other keys use normal JavaScript reference or
primitive equality.
Example (Using a mutable hash map)
import { MutableHashMap } from "effect"
// Create a mutable hash map with string keys and number values
const map: MutableHashMap.MutableHashMap<string, number> = MutableHashMap
.empty()
// Add some data
MutableHashMap.set(map, "count", 42)
MutableHashMap.set(map, "total", 100)
// Use as iterable
for (const [key, value] of map) {
console.log(`${key}: ${value}`)
}
// Output:
// count: 42
// total: 100
// Convert to array
const entries = Array.from(map)
console.log(entries) // [["count", 42], ["total", 100]]
MutableHashMap<function (type parameter) K in <K, V>(self: MutableHashMap<K, V>, key_: K): MutableHashMap<K, V>K, function (type parameter) V in <K, V>(self: MutableHashMap<K, V>, key_: K): MutableHashMap<K, V>V>, key_: Kkey_: function (type parameter) K in <K, V>(self: MutableHashMap<K, V>, key_: K): MutableHashMap<K, V>K) => {
if (const isSimpleKey: (u: unknown) => booleanisSimpleKey(key_: Kkey_)) {
self: MutableHashMap<K, V>(parameter) self: {
backing: Map<K, V>;
buckets: Map<number, NonEmptyArray<K>>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
self.MutableHashMap<K, V>.backing: Map<K, V>backing.Map<K, V>.delete(key: K): booleandelete(key_: Kkey_)
return self: MutableHashMap<K, V>(parameter) self: {
backing: Map<K, V>;
buckets: Map<number, NonEmptyArray<K>>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
self
}
const const key: anykey = const referentialKeysCache: WeakMap<
any,
any
>
referentialKeysCache.WeakMap<any, any>.get(key: any): anyget(self: MutableHashMap<K, V>(parameter) self: {
backing: Map<K, V>;
buckets: Map<number, NonEmptyArray<K>>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
self) ?? key_: Kkey_
const const hash: anyhash = import HashHash.hash(const key: anykey)
const const bucket: anybucket = self: MutableHashMap<K, V>(parameter) self: {
backing: Map<K, V>;
buckets: Map<number, NonEmptyArray<K>>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
self.MutableHashMap<out K, out V>.buckets: Map<number, NonEmptyArray<K>>buckets.Map<number, NonEmptyArray<K>>.get(key: number): anyReturns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map.
get(const hash: anyhash)
if (const bucket: anybucket === var undefinedundefined) {
return self: MutableHashMap<K, V>(parameter) self: {
backing: Map<K, V>;
buckets: Map<number, NonEmptyArray<K>>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
self
}
for (let let i: numberi = 0, let len: anylen = const bucket: anyconst bucket: {
0: K;
length: number;
toString: () => string;
toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string };
pop: () => K | undefined;
push: (...items: Array<K>) => number;
concat: { (...items: Array<ConcatArray<K>>): Array<K>; (...items: Array<K | ConcatArray<K>>): Array<K> };
join: (separator?: string) => string;
reverse: () => Array<K>;
shift: () => K | undefined;
slice: (start?: number, end?: number) => Array<K>;
sort: (compareFn?: ((a: K, b: K) => number) | undefined) => [K, ...K[]];
splice: { (start: number, deleteCount?: number): Array<K>; (start: number, deleteCount: number, ...items: Array<K>): Array<K> };
unshift: (...items: Array<K>) => number;
indexOf: (searchElement: K, fromIndex?: number) => number;
lastIndexOf: (searchElement: K, fromIndex?: number) => number;
every: { (predicate: (value: K, index: number, array: Array<K>) => value is S, thisArg?: any): this is S[]; (predicate: (value: K, index: number, array: Array<K>) => unknown, thisArg?: any): boolean };
some: (predicate: (value: K, index: number, array: Array<K>) => unknown, thisArg?: any) => boolean;
forEach: (callbackfn: (value: K, index: number, array: Array<K>) => void, thisArg?: any) => void;
map: (callbackfn: (value: K, index: number, array: Array<K>) => U, thisArg?: any) => Array<U>;
filter: { (predicate: (value: K, index: number, array: Array<K>) => value is S, thisArg?: any): Array<S>; (predicate: (value: K, index: number, array: Array<K>) => unknown, thisArg?: any): Array<K> };
reduce: { (callbackfn: (previousValue: K, currentValue: K, currentIndex: number, array: Array<K>) => K): K; (callbackfn: (previousValue: K, currentValue: K, currentIndex: number, array: Array<K>) => K, initialValue: K): K; (callbackfn: (previousVa…;
reduceRight: { (callbackfn: (previousValue: K, currentValue: K, currentIndex: number, array: Array<K>) => K): K; (callbackfn: (previousValue: K, currentValue: K, currentIndex: number, array: Array<K>) => K, initialValue: K): K; (callbackfn: (previousVa…;
find: { (predicate: (value: K, index: number, obj: Array<K>) => value is S, thisArg?: any): S | undefined; (predicate: (value: K, index: number, obj: Array<K>) => unknown, thisArg?: any): K | undefined };
findIndex: (predicate: (value: K, index: number, obj: Array<K>) => unknown, thisArg?: any) => number;
fill: (value: K, start?: number, end?: number) => [K, ...K[]];
copyWithin: (target: number, start: number, end?: number) => [K, ...K[]];
entries: () => ArrayIterator<[number, K]>;
keys: () => ArrayIterator<number>;
values: () => ArrayIterator<K>;
includes: (searchElement: K, fromIndex?: number) => boolean;
flatMap: (callback: (this: This, value: K, index: number, array: Array<K>) => U | ReadonlyArray<U>, thisArg?: This | undefined) => Array<U>;
flat: (this: A, depth?: D | undefined) => Array<FlatArray<A, D>>;
at: (index: number) => K | undefined;
findLast: { (predicate: (value: K, index: number, array: Array<K>) => value is S, thisArg?: any): S | undefined; (predicate: (value: K, index: number, array: Array<K>) => unknown, thisArg?: any): K | undefined };
findLastIndex: (predicate: (value: K, index: number, array: Array<K>) => unknown, thisArg?: any) => number;
toReversed: () => Array<K>;
toSorted: (compareFn?: ((a: K, b: K) => number) | undefined) => Array<K>;
toSpliced: { (start: number, deleteCount: number, ...items: Array<K>): Array<K>; (start: number, deleteCount?: number): Array<K> };
with: (index: number, value: K) => Array<K>;
}
bucket.length; let i: numberi < let len: anylen; let i: numberi++) {
const const bkey: anybkey = const bucket: anyconst bucket: {
0: K;
length: number;
toString: () => string;
toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string };
pop: () => K | undefined;
push: (...items: Array<K>) => number;
concat: { (...items: Array<ConcatArray<K>>): Array<K>; (...items: Array<K | ConcatArray<K>>): Array<K> };
join: (separator?: string) => string;
reverse: () => Array<K>;
shift: () => K | undefined;
slice: (start?: number, end?: number) => Array<K>;
sort: (compareFn?: ((a: K, b: K) => number) | undefined) => [K, ...K[]];
splice: { (start: number, deleteCount?: number): Array<K>; (start: number, deleteCount: number, ...items: Array<K>): Array<K> };
unshift: (...items: Array<K>) => number;
indexOf: (searchElement: K, fromIndex?: number) => number;
lastIndexOf: (searchElement: K, fromIndex?: number) => number;
every: { (predicate: (value: K, index: number, array: Array<K>) => value is S, thisArg?: any): this is S[]; (predicate: (value: K, index: number, array: Array<K>) => unknown, thisArg?: any): boolean };
some: (predicate: (value: K, index: number, array: Array<K>) => unknown, thisArg?: any) => boolean;
forEach: (callbackfn: (value: K, index: number, array: Array<K>) => void, thisArg?: any) => void;
map: (callbackfn: (value: K, index: number, array: Array<K>) => U, thisArg?: any) => Array<U>;
filter: { (predicate: (value: K, index: number, array: Array<K>) => value is S, thisArg?: any): Array<S>; (predicate: (value: K, index: number, array: Array<K>) => unknown, thisArg?: any): Array<K> };
reduce: { (callbackfn: (previousValue: K, currentValue: K, currentIndex: number, array: Array<K>) => K): K; (callbackfn: (previousValue: K, currentValue: K, currentIndex: number, array: Array<K>) => K, initialValue: K): K; (callbackfn: (previousVa…;
reduceRight: { (callbackfn: (previousValue: K, currentValue: K, currentIndex: number, array: Array<K>) => K): K; (callbackfn: (previousValue: K, currentValue: K, currentIndex: number, array: Array<K>) => K, initialValue: K): K; (callbackfn: (previousVa…;
find: { (predicate: (value: K, index: number, obj: Array<K>) => value is S, thisArg?: any): S | undefined; (predicate: (value: K, index: number, obj: Array<K>) => unknown, thisArg?: any): K | undefined };
findIndex: (predicate: (value: K, index: number, obj: Array<K>) => unknown, thisArg?: any) => number;
fill: (value: K, start?: number, end?: number) => [K, ...K[]];
copyWithin: (target: number, start: number, end?: number) => [K, ...K[]];
entries: () => ArrayIterator<[number, K]>;
keys: () => ArrayIterator<number>;
values: () => ArrayIterator<K>;
includes: (searchElement: K, fromIndex?: number) => boolean;
flatMap: (callback: (this: This, value: K, index: number, array: Array<K>) => U | ReadonlyArray<U>, thisArg?: This | undefined) => Array<U>;
flat: (this: A, depth?: D | undefined) => Array<FlatArray<A, D>>;
at: (index: number) => K | undefined;
findLast: { (predicate: (value: K, index: number, array: Array<K>) => value is S, thisArg?: any): S | undefined; (predicate: (value: K, index: number, array: Array<K>) => unknown, thisArg?: any): K | undefined };
findLastIndex: (predicate: (value: K, index: number, array: Array<K>) => unknown, thisArg?: any) => number;
toReversed: () => Array<K>;
toSorted: (compareFn?: ((a: K, b: K) => number) | undefined) => Array<K>;
toSpliced: { (start: number, deleteCount: number, ...items: Array<K>): Array<K>; (start: number, deleteCount?: number): Array<K> };
with: (index: number, value: K) => Array<K>;
}
bucket[let i: numberi]
if (const bkey: anybkey === const key: anykey || import EqualEqual.equals(const key: anykey, const bkey: anybkey)) {
self: MutableHashMap<K, V>(parameter) self: {
backing: Map<K, V>;
buckets: Map<number, NonEmptyArray<K>>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
self.MutableHashMap<K, V>.backing: Map<K, V>backing.Map<K, V>.delete(key: K): booleandelete(const bkey: anybkey)
const bucket: anyconst bucket: {
0: K;
length: number;
toString: () => string;
toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string };
pop: () => K | undefined;
push: (...items: Array<K>) => number;
concat: { (...items: Array<ConcatArray<K>>): Array<K>; (...items: Array<K | ConcatArray<K>>): Array<K> };
join: (separator?: string) => string;
reverse: () => Array<K>;
shift: () => K | undefined;
slice: (start?: number, end?: number) => Array<K>;
sort: (compareFn?: ((a: K, b: K) => number) | undefined) => [K, ...K[]];
splice: { (start: number, deleteCount?: number): Array<K>; (start: number, deleteCount: number, ...items: Array<K>): Array<K> };
unshift: (...items: Array<K>) => number;
indexOf: (searchElement: K, fromIndex?: number) => number;
lastIndexOf: (searchElement: K, fromIndex?: number) => number;
every: { (predicate: (value: K, index: number, array: Array<K>) => value is S, thisArg?: any): this is S[]; (predicate: (value: K, index: number, array: Array<K>) => unknown, thisArg?: any): boolean };
some: (predicate: (value: K, index: number, array: Array<K>) => unknown, thisArg?: any) => boolean;
forEach: (callbackfn: (value: K, index: number, array: Array<K>) => void, thisArg?: any) => void;
map: (callbackfn: (value: K, index: number, array: Array<K>) => U, thisArg?: any) => Array<U>;
filter: { (predicate: (value: K, index: number, array: Array<K>) => value is S, thisArg?: any): Array<S>; (predicate: (value: K, index: number, array: Array<K>) => unknown, thisArg?: any): Array<K> };
reduce: { (callbackfn: (previousValue: K, currentValue: K, currentIndex: number, array: Array<K>) => K): K; (callbackfn: (previousValue: K, currentValue: K, currentIndex: number, array: Array<K>) => K, initialValue: K): K; (callbackfn: (previousVa…;
reduceRight: { (callbackfn: (previousValue: K, currentValue: K, currentIndex: number, array: Array<K>) => K): K; (callbackfn: (previousValue: K, currentValue: K, currentIndex: number, array: Array<K>) => K, initialValue: K): K; (callbackfn: (previousVa…;
find: { (predicate: (value: K, index: number, obj: Array<K>) => value is S, thisArg?: any): S | undefined; (predicate: (value: K, index: number, obj: Array<K>) => unknown, thisArg?: any): K | undefined };
findIndex: (predicate: (value: K, index: number, obj: Array<K>) => unknown, thisArg?: any) => number;
fill: (value: K, start?: number, end?: number) => [K, ...K[]];
copyWithin: (target: number, start: number, end?: number) => [K, ...K[]];
entries: () => ArrayIterator<[number, K]>;
keys: () => ArrayIterator<number>;
values: () => ArrayIterator<K>;
includes: (searchElement: K, fromIndex?: number) => boolean;
flatMap: (callback: (this: This, value: K, index: number, array: Array<K>) => U | ReadonlyArray<U>, thisArg?: This | undefined) => Array<U>;
flat: (this: A, depth?: D | undefined) => Array<FlatArray<A, D>>;
at: (index: number) => K | undefined;
findLast: { (predicate: (value: K, index: number, array: Array<K>) => value is S, thisArg?: any): S | undefined; (predicate: (value: K, index: number, array: Array<K>) => unknown, thisArg?: any): K | undefined };
findLastIndex: (predicate: (value: K, index: number, array: Array<K>) => unknown, thisArg?: any) => number;
toReversed: () => Array<K>;
toSorted: (compareFn?: ((a: K, b: K) => number) | undefined) => Array<K>;
toSpliced: { (start: number, deleteCount: number, ...items: Array<K>): Array<K>; (start: number, deleteCount?: number): Array<K> };
with: (index: number, value: K) => Array<K>;
}
bucket.splice(let i: numberi, 1)
break
}
}
if (const bucket: anyconst bucket: {
0: K;
length: number;
toString: () => string;
toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string };
pop: () => K | undefined;
push: (...items: Array<K>) => number;
concat: { (...items: Array<ConcatArray<K>>): Array<K>; (...items: Array<K | ConcatArray<K>>): Array<K> };
join: (separator?: string) => string;
reverse: () => Array<K>;
shift: () => K | undefined;
slice: (start?: number, end?: number) => Array<K>;
sort: (compareFn?: ((a: K, b: K) => number) | undefined) => [K, ...K[]];
splice: { (start: number, deleteCount?: number): Array<K>; (start: number, deleteCount: number, ...items: Array<K>): Array<K> };
unshift: (...items: Array<K>) => number;
indexOf: (searchElement: K, fromIndex?: number) => number;
lastIndexOf: (searchElement: K, fromIndex?: number) => number;
every: { (predicate: (value: K, index: number, array: Array<K>) => value is S, thisArg?: any): this is S[]; (predicate: (value: K, index: number, array: Array<K>) => unknown, thisArg?: any): boolean };
some: (predicate: (value: K, index: number, array: Array<K>) => unknown, thisArg?: any) => boolean;
forEach: (callbackfn: (value: K, index: number, array: Array<K>) => void, thisArg?: any) => void;
map: (callbackfn: (value: K, index: number, array: Array<K>) => U, thisArg?: any) => Array<U>;
filter: { (predicate: (value: K, index: number, array: Array<K>) => value is S, thisArg?: any): Array<S>; (predicate: (value: K, index: number, array: Array<K>) => unknown, thisArg?: any): Array<K> };
reduce: { (callbackfn: (previousValue: K, currentValue: K, currentIndex: number, array: Array<K>) => K): K; (callbackfn: (previousValue: K, currentValue: K, currentIndex: number, array: Array<K>) => K, initialValue: K): K; (callbackfn: (previousVa…;
reduceRight: { (callbackfn: (previousValue: K, currentValue: K, currentIndex: number, array: Array<K>) => K): K; (callbackfn: (previousValue: K, currentValue: K, currentIndex: number, array: Array<K>) => K, initialValue: K): K; (callbackfn: (previousVa…;
find: { (predicate: (value: K, index: number, obj: Array<K>) => value is S, thisArg?: any): S | undefined; (predicate: (value: K, index: number, obj: Array<K>) => unknown, thisArg?: any): K | undefined };
findIndex: (predicate: (value: K, index: number, obj: Array<K>) => unknown, thisArg?: any) => number;
fill: (value: K, start?: number, end?: number) => [K, ...K[]];
copyWithin: (target: number, start: number, end?: number) => [K, ...K[]];
entries: () => ArrayIterator<[number, K]>;
keys: () => ArrayIterator<number>;
values: () => ArrayIterator<K>;
includes: (searchElement: K, fromIndex?: number) => boolean;
flatMap: (callback: (this: This, value: K, index: number, array: Array<K>) => U | ReadonlyArray<U>, thisArg?: This | undefined) => Array<U>;
flat: (this: A, depth?: D | undefined) => Array<FlatArray<A, D>>;
at: (index: number) => K | undefined;
findLast: { (predicate: (value: K, index: number, array: Array<K>) => value is S, thisArg?: any): S | undefined; (predicate: (value: K, index: number, array: Array<K>) => unknown, thisArg?: any): K | undefined };
findLastIndex: (predicate: (value: K, index: number, array: Array<K>) => unknown, thisArg?: any) => number;
toReversed: () => Array<K>;
toSorted: (compareFn?: ((a: K, b: K) => number) | undefined) => Array<K>;
toSpliced: { (start: number, deleteCount: number, ...items: Array<K>): Array<K>; (start: number, deleteCount?: number): Array<K> };
with: (index: number, value: K) => Array<K>;
}
bucket.length === 0) {
self: MutableHashMap<K, V>(parameter) self: {
backing: Map<K, V>;
buckets: Map<number, NonEmptyArray<K>>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
self.MutableHashMap<out K, out V>.buckets: Map<number, NonEmptyArray<K>>buckets.Map<number, NonEmptyArray<K>>.delete(key: number): booleandelete(const hash: anyhash)
}
return self: MutableHashMap<K, V>(parameter) self: {
backing: Map<K, V>;
buckets: Map<number, NonEmptyArray<K>>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
self
})