Promise objects represent the eventual result of an asynchronous operation. The primary way of interacting with a promise is through its `then` method, which registers callbacks to receive either a promise's eventual value or the reason why the promise cannot be fulfilled. Terminology ---
(resolver)
| 871 | @constructor |
| 872 | */ |
| 873 | function Promise(resolver) { |
| 874 | this[PROMISE_ID] = nextId(); |
| 875 | this._result = this._state = undefined; |
| 876 | this._subscribers = []; |
| 877 | |
| 878 | if (noop !== resolver) { |
| 879 | typeof resolver !== 'function' && needsResolver(); |
| 880 | this instanceof Promise ? initializePromise(this, resolver) : needsNew(); |
| 881 | } |
| 882 | } |
| 883 | |
| 884 | Promise.all = all; |
| 885 | Promise.race = race; |
nothing calls this directly
no test coverage detected