You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
838 B
18 lines
838 B
'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); |
|
} |
|
});
|
|
|