esnext.function.metadata.js 450 B

1234567891011121314
  1. 'use strict';
  2. var wellKnownSymbol = require('../internals/well-known-symbol');
  3. var defineProperty = require('../internals/object-define-property').f;
  4. var METADATA = wellKnownSymbol('metadata');
  5. var FunctionPrototype = Function.prototype;
  6. // Function.prototype[@@metadata]
  7. // https://github.com/tc39/proposal-decorator-metadata
  8. if (FunctionPrototype[METADATA] === undefined) {
  9. defineProperty(FunctionPrototype, METADATA, {
  10. value: null
  11. });
  12. }