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 | */
|
---|
7 | declare function whichCollection<K, V>(value: Map<K, V>): 'Map';
|
---|
8 | declare function whichCollection<T>(value: Set<T>): 'Set';
|
---|
9 | declare function whichCollection<K extends WeakKey, V>(value: WeakMap<K, V>): 'WeakMap';
|
---|
10 | declare function whichCollection<T extends WeakKey>(value: WeakSet<T>): 'WeakSet';
|
---|
11 | declare function whichCollection(value: null | undefined | boolean | number | bigint | symbol | unknown): false;
|
---|
12 |
|
---|
13 | export = whichCollection;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.