typeson-registry 14.2.1 → 14.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3225,7 +3225,21 @@
3225
3225
  // HTML-SPECIFIC
3226
3226
  'Event',
3227
3227
  // Also in Node `worker_threads` (currently experimental)
3228
- 'MessageChannel'].includes(stringTag) ||
3228
+ 'MessageChannel', 'MessagePort'].includes(stringTag) ||
3229
+ // Node's native `worker_threads` `MessageChannel`/
3230
+ // `MessagePort` don't set `Symbol.toStringTag` per
3231
+ // https://github.com/nodejs/node/issues/65527
3232
+ // (verified directly:
3233
+ // `{}.toString.call(new MessageChannel())` is
3234
+ // `"[object Object]"`, and `.port1`'s is
3235
+ // `"[object EventTarget]"`, its own base class), so the
3236
+ // `stringTag` check above can't catch them there; a real
3237
+ // browser's `MessagePort`/`MessageChannel` already match
3238
+ // via `stringTag` (or, for `MessagePort`, would need its
3239
+ // own `stringTag` entry if ever seen failing to match) --
3240
+ // this is purely a fallback for environments (like Node)
3241
+ // that don't set the tag.
3242
+ val && val.constructor && ['MessageChannel', 'MessagePort'].includes(val.constructor.name) ||
3229
3243
  // 1. `IsDetachedBuffer` (a process not called within the
3230
3244
  // ECMAScript spec)
3231
3245
  ['ArrayBuffer', 'DataView', 'Int8Array', 'Uint8Array', 'Uint8ClampedArray', 'Int16Array', 'Uint16Array', 'Int32Array', 'Uint32Array', 'Float32Array', 'Float64Array', 'BigInt64Array', 'BigUint64Array'].includes(stringTag) && isBufferDetached(val) || (