/** * Copyright (c) 2017 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author David Sehnal */ /** Immutable by convention IntMap */ interface IntMap { has(key: number): boolean; keys(): IterableIterator; values(): IterableIterator; get(key: number): T; readonly size: number; } declare namespace IntMap { const Empty: IntMap; interface Mutable extends IntMap { set(key: number, value: T): void; } function keyArray(map: IntMap): number[]; function Mutable(): Mutable; function asImmutable(map: IntMap): IntMap; function copy(map: IntMap): Mutable; function addFrom(map: Mutable, src: IntMap): Mutable; } export { IntMap };