Changeset 79a0317 for imaps-frontend/node_modules/internal-slot/index.js
Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/internal-slot/index.js
r0c6b92a r79a0317 1 1 'use strict'; 2 2 3 /** @typedef {`$${import('.').InternalSlot}`} SaltedInternalSlot */ 4 /** @typedef {{ [k in SaltedInternalSlot]?: unknown }} SlotsObject */ 5 3 6 var hasOwn = require('hasown'); 7 /** @type {import('side-channel').Channel<object, SlotsObject>} */ 4 8 var channel = require('side-channel')(); 5 9 6 10 var $TypeError = require('es-errors/type'); 7 11 12 /** @type {import('.')} */ 8 13 var SLOT = { 9 14 assert: function (O, slot) { … … 27 32 } 28 33 var slots = channel.get(O); 29 return slots && slots['$' + slot]; 34 // eslint-disable-next-line no-extra-parens 35 return slots && slots[/** @type {SaltedInternalSlot} */ ('$' + slot)]; 30 36 }, 31 37 has: function (O, slot) { … … 37 43 } 38 44 var slots = channel.get(O); 39 return !!slots && hasOwn(slots, '$' + slot); 45 // eslint-disable-next-line no-extra-parens 46 return !!slots && hasOwn(slots, /** @type {SaltedInternalSlot} */ ('$' + slot)); 40 47 }, 41 48 set: function (O, slot, V) { … … 51 58 channel.set(O, slots); 52 59 } 53 slots['$' + slot] = V; 60 // eslint-disable-next-line no-extra-parens 61 slots[/** @type {SaltedInternalSlot} */ ('$' + slot)] = V; 54 62 } 55 63 };
Note:
See TracChangeset
for help on using the changeset viewer.