Ignore:
Timestamp:
01/21/25 03:08:24 (3 days ago)
Author:
stefan toskovski <stefantoska84@…>
Branches:
main
Parents:
0c6b92a
Message:

F4 Finalna Verzija

File:
1 edited

Legend:

Unmodified
Added
Removed
  • imaps-frontend/node_modules/is-weakset/index.js

    r0c6b92a r79a0317  
    22
    33var GetIntrinsic = require('get-intrinsic');
    4 var callBound = require('call-bind/callBound');
     4var callBound = require('call-bound');
    55
    66var $WeakSet = GetIntrinsic('%WeakSet%', true);
    77
     8/** @type {undefined | (<V>(thisArg: Set<V>, value: V) => boolean)} */
    89var $setHas = callBound('WeakSet.prototype.has', true);
    910
    1011if ($setHas) {
     12        /** @type {undefined | (<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => boolean)} */
    1113        var $mapHas = callBound('WeakMap.prototype.has', true);
    1214
     
    1719                }
    1820                try {
     21                        // @ts-expect-error TS can't figure out that $setHas is always truthy here
    1922                        $setHas(x, $setHas);
    2023                        if ($mapHas) {
    2124                                try {
     25                                        // @ts-expect-error this indeed might not be a weak collection
    2226                                        $mapHas(x, $mapHas);
    2327                                } catch (e) {
     
    3236} else {
    3337        /** @type {import('.')} */
    34         // eslint-disable-next-line no-unused-vars
    35         module.exports = function isWeakSet(x) {
     38        // @ts-expect-error
     39        module.exports = function isWeakSet(x) { // eslint-disable-line no-unused-vars
    3640                // `WeakSet` does not exist, or does not have a `has` method
    3741                return false;
Note: See TracChangeset for help on using the changeset viewer.