source: imaps-frontend/node_modules/core-js/modules/esnext.symbol.async-dispose.js@ 79a0317

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

F4 Finalna Verzija

  • Property mode set to 100644
File size: 955 bytes
Line 
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.asyncDispose` well-known symbol
10// https://github.com/tc39/proposal-async-explicit-resource-management
11defineWellKnownSymbol('asyncDispose');
12
13if (Symbol) {
14 var descriptor = getOwnPropertyDescriptor(Symbol, 'asyncDispose');
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, 'asyncDispose', { value: descriptor.value, enumerable: false, configurable: false, writable: false });
20 }
21}
Note: See TracBrowser for help on using the repository browser.