UNPKG

molstar

Version:

A comprehensive macromolecular library.

14 lines (13 loc) 609 B
/** * Copyright (c) 2018-2025 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Alexander Rose <alexander.rose@weirdbyte.de> * @author David Sehnal <david.sehnal@gmail.com> */ export interface DefaultMap<K, V> extends Map<K, V> { /** Return the value for `key` when available or the default value otherwise. */ getDefault: (key: K) => V; } /** A `Map` instance with a `getDefault` method added. */ export declare function DefaultMap<K, V>(valueCtor: () => V): DefaultMap<K, V>; export declare function arrayMapAdd<K, V>(map: Map<K, V[]>, key: K, value: V): void;