CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes48downloads
isWeakSet.d.ts24 linesDownload Raw Back to predicate
1/**2 * Checks if the given value is a `WeakSet`.3 *4 * This function tests whether the provided value is an instance of `WeakSet`.5 * It returns `true` if the value is a `WeakSet`, and `false` otherwise.6 *7 * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `WeakSet`.8 *9 * @param {unknown} value - The value to test if it is a `WeakSet`.10 * @returns {value is WeakSet<WeakKey>} true if the value is a `WeakSet`, false otherwise.11 *12 * @example13 * const value1 = new WeakSet();14 * const value2 = new Map();15 * const value3 = new Set();16 *17 * console.log(isWeakSet(value1)); // true18 * console.log(isWeakSet(value2)); // false19 * console.log(isWeakSet(value3)); // false20 */21declare function isWeakSet(value: unknown): value is WeakSet<WeakKey>;22 23export { isWeakSet };24 
basant307/AI_Governance_Project · CoolFace