123456789101112131415161718 |
- 'use strict';
- var $ = require('../internals/export');
- var getBuiltIn = require('../internals/get-built-in');
- var IS_PURE = require('../internals/is-pure');
- var NativePromiseConstructor = require('../internals/promise-native-constructor');
- var FORCED_PROMISE_CONSTRUCTOR = require('../internals/promise-constructor-detection').CONSTRUCTOR;
- var promiseResolve = require('../internals/promise-resolve');
- var PromiseConstructorWrapper = getBuiltIn('Promise');
- var CHECK_WRAPPER = IS_PURE && !FORCED_PROMISE_CONSTRUCTOR;
- // `Promise.resolve` method
- // https://tc39.es/ecma262/#sec-promise.resolve
- $({ target: 'Promise', stat: true, forced: IS_PURE || FORCED_PROMISE_CONSTRUCTOR }, {
- resolve: function resolve(x) {
- return promiseResolve(CHECK_WRAPPER && this === PromiseConstructorWrapper ? NativePromiseConstructor : this, x);
- }
- });
|