source: node_modules/es-toolkit/dist/predicate/isSet.d.ts

Last change on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 616 bytes
Line 
1/**
2 * Checks if a given value is `Set`.
3 *
4 * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `Set`.
5 *
6 * @param {unknown} value The value to check if it is a `Set`.
7 * @returns {value is Set<any>} Returns `true` if `value` is a `Set`, else `false`.
8 *
9 * @example
10 * const value1 = new Set();
11 * const value2 = new Map();
12 * const value3 = new WeakSet();
13 *
14 * console.log(isSet(value1)); // true
15 * console.log(isSet(value2)); // false
16 * console.log(isSet(value3)); // false
17 */
18declare function isSet(value: unknown): value is Set<any>;
19
20export { isSet };
Note: See TracBrowser for help on using the repository browser.