Afanasev_Stepan_PIbd-21_IP/ИП 3 лаба/node_modules/es-abstract/2021/PromiseResolve.js
[USERNAME] 0dd26716dc Lab2-5
2024-01-10 16:11:49 +04:00

18 lines
457 B
JavaScript

'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBind = require('call-bind');
var $resolve = GetIntrinsic('%Promise.resolve%', true);
var $PromiseResolve = $resolve && callBind($resolve);
// https://262.ecma-international.org/9.0/#sec-promise-resolve
module.exports = function PromiseResolve(C, x) {
if (!$PromiseResolve) {
throw new SyntaxError('This environment does not support Promises.');
}
return $PromiseResolve(C, x);
};