main
Last change
on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
522 bytes
|
Rev | Line | |
---|
[79a0317] | 1 | 'use strict';
|
---|
| 2 | var $ = require('../internals/export');
|
---|
| 3 | var newPromiseCapabilityModule = require('../internals/new-promise-capability');
|
---|
| 4 |
|
---|
| 5 | // `Promise.withResolvers` method
|
---|
| 6 | // https://tc39.es/ecma262/#sec-promise.withResolvers
|
---|
| 7 | $({ target: 'Promise', stat: true }, {
|
---|
| 8 | withResolvers: function withResolvers() {
|
---|
| 9 | var promiseCapability = newPromiseCapabilityModule.f(this);
|
---|
| 10 | return {
|
---|
| 11 | promise: promiseCapability.promise,
|
---|
| 12 | resolve: promiseCapability.resolve,
|
---|
| 13 | reject: promiseCapability.reject
|
---|
| 14 | };
|
---|
| 15 | }
|
---|
| 16 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.