UNPKG

scats

Version:

Useful scala classes in typescript

20 lines (19 loc) 963 B
import { mutable, Option } from './index.js'; import { AbstractMap, Tuple2 } from './abstract-map.js'; export declare class HashMap<K, V> extends AbstractMap<K, V, HashMap<K, V>> { protected readonly map: Map<K, V>; protected fromArray(array: Tuple2<K, V>[]): HashMap<K, V>; protected constructor(map: Map<K, V>); static of<K, V>(...values: Tuple2<K, V>[]): HashMap<K, V>; static from<K, V>(values: Iterable<Tuple2<K, V>>): HashMap<K, V>; static empty: HashMap<any, any>; appendedAll(map: HashMap<K, V>): HashMap<K, V>; appended(key: K, value: V): HashMap<K, V>; updated(key: K, value: V): HashMap<K, V>; removed(key: K): HashMap<K, V>; removedAll(keys: Iterable<K>): HashMap<K, V>; concat(map: HashMap<K, V>): HashMap<K, V>; set(key: K, value: V): HashMap<K, V>; updatedWith(key: K): (remappingFunction: (maybeValue: Option<V>) => Option<V>) => HashMap<K, V>; get toMutable(): mutable.HashMap<K, V>; }