scats
Version:
Useful scala classes in typescript
22 lines (21 loc) • 931 B
TypeScript
import { HashMap } from './hashmap.js';
import { AbstractSet } from './abstract-set.js';
import * as mutable from './mutable/hashset.js';
export declare class HashSet<T> extends AbstractSet<T, HashSet<T>> {
protected constructor(items: Set<T>);
static empty: HashSet<any>;
static of<T>(...items: T[]): HashSet<T>;
static from<T>(elements: Iterable<T>): HashSet<T>;
protected fromArray(array: T[]): HashSet<T>;
toMap<K, V>(mapper: (item: T) => [K, V]): HashMap<K, V>;
map<B>(f: (item: T) => B): HashSet<B>;
flatMap<B>(f: (item: T) => HashSet<B>): HashSet<B>;
concat(that: Iterable<T>): HashSet<T>;
union(other: Iterable<T>): HashSet<T>;
appended(item: T): HashSet<T>;
appendedAll(other: Iterable<T>): HashSet<T>;
removed(item: T): HashSet<T>;
removedAll(other: Iterable<T>): HashSet<T>;
intersect(other: HashSet<T>): HashSet<T>;
get toMutable(): mutable.HashSet<T>;
}