source: imaps-frontend/node_modules/core-js/modules/esnext.symbol.dispose.js

main
Last change on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 929 bytes
RevLine 
[79a0317]1'use strict';
2var globalThis = require('../internals/global-this');
3var defineWellKnownSymbol = require('../internals/well-known-symbol-define');
4var defineProperty = require('../internals/object-define-property').f;
5var getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;
6
7var Symbol = globalThis.Symbol;
8
9// `Symbol.dispose` well-known symbol
10// https://github.com/tc39/proposal-explicit-resource-management
11defineWellKnownSymbol('dispose');
12
13if (Symbol) {
14 var descriptor = getOwnPropertyDescriptor(Symbol, 'dispose');
15 // workaround of NodeJS 20.4 bug
16 // https://github.com/nodejs/node/issues/48699
17 // and incorrect descriptor from some transpilers and userland helpers
18 if (descriptor.enumerable && descriptor.configurable && descriptor.writable) {
19 defineProperty(Symbol, 'dispose', { value: descriptor.value, enumerable: false, configurable: false, writable: false });
20 }
21}
Note: See TracBrowser for help on using the repository browser.