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:
583 bytes
|
Rev | Line | |
---|
[79a0317] | 1 | 'use strict';
|
---|
| 2 | var $ = require('../internals/export');
|
---|
| 3 | var newPromiseCapabilityModule = require('../internals/new-promise-capability');
|
---|
| 4 | var FORCED_PROMISE_CONSTRUCTOR = require('../internals/promise-constructor-detection').CONSTRUCTOR;
|
---|
| 5 |
|
---|
| 6 | // `Promise.reject` method
|
---|
| 7 | // https://tc39.es/ecma262/#sec-promise.reject
|
---|
| 8 | $({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
|
---|
| 9 | reject: function reject(r) {
|
---|
| 10 | var capability = newPromiseCapabilityModule.f(this);
|
---|
| 11 | var capabilityReject = capability.reject;
|
---|
| 12 | capabilityReject(r);
|
---|
| 13 | return capability.promise;
|
---|
| 14 | }
|
---|
| 15 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.