@monstermann/fn
Version:
A utility library for TypeScript.
24 lines • 563 B
TypeScript
//#region src/set/isSet.d.ts
/**
* `isSet(target)`
*
* Checks if the `target` value is a Set instance. Returns `true` if the value is a Set, `false` otherwise.
*
* ```ts
* isSet(new Set([1, 2, 3])); // true
* isSet([1, 2, 3]); // false
* isSet({}); // false
* ```
*
* ```ts
* pipe(new Set([1, 2, 3]), isSet()); // true
* pipe([1, 2, 3], isSet()); // false
* pipe({}, isSet()); // false
* ```
*/
declare const isSet: {
(): (target: unknown) => target is Set<unknown>;
(target: unknown): target is Set<unknown>;
};
//#endregion
export { isSet };