source: imaps-frontend/node_modules/which-collection/index.d.ts

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 670 bytes
Line 
1/**
2 * Determines the type of the given collection, or returns false.
3 *
4 * @param {unknown} value The potential collection
5 * @returns {'Map' | 'Set' | 'WeakMap' | 'WeakSet' | false} 'Map' | 'Set' | 'WeakMap' | 'WeakSet' | false
6 */
7declare function whichCollection<K, V>(value: Map<K, V>): 'Map';
8declare function whichCollection<T>(value: Set<T>): 'Set';
9declare function whichCollection<K extends WeakKey, V>(value: WeakMap<K, V>): 'WeakMap';
10declare function whichCollection<T extends WeakKey>(value: WeakSet<T>): 'WeakSet';
11declare function whichCollection(value: null | undefined | boolean | number | bigint | symbol | unknown): false;
12
13export = whichCollection;
Note: See TracBrowser for help on using the repository browser.