This commit is contained in:
2026-07-26 21:23:30 +00:00
parent 6fa0e1b9a6
commit 7c262aeb8b
60 changed files with 2359 additions and 582 deletions
+5 -2
View File
@@ -18,7 +18,10 @@ module.exports = function getSideChannel() {
var channel = {
assert: function (key) {
if (!channel.has(key)) {
throw new $TypeError('Side channel does not contain ' + inspect(key));
var keyDesc = key && Object(key) === key
? 'the given object key'
: inspect(key);
throw new $TypeError('Side channel does not contain ' + keyDesc);
}
},
'delete': function (key) {
@@ -38,6 +41,6 @@ module.exports = function getSideChannel() {
$channelData.set(key, value);
}
};
// @ts-expect-error TODO: figure out why this is erroring
return channel;
};