Frontend/25_01_07/mai/node_modules/es-abstract/2019/PromiseResolve.js
szabomarton 7f4a15b9c3 asd
2025-01-28 11:38:27 +01:00

19 lines
506 B
JavaScript

'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBind = require('call-bind');
var $SyntaxError = require('es-errors/syntax');
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);
};