MCPcopy Create free account
hub / github.com/ampproject/amphtml / constructor

Method constructor

src/core/data-structures/promise.js:80–92  ·  view source on GitHub ↗

* @param {Array >=} opt_promises

(opt_promises)

Source from the content-addressed store, hash-verified

78 * @param {Array<PromiseLike<T>>=} opt_promises
79 */
80 constructor(opt_promises) {
81 /** @private @const {Deferred<T>} */
82 this.deferred_ = new Deferred();
83
84 /** @private */
85 this.count_ = 0;
86
87 if (opt_promises) {
88 for (const promise of opt_promises) {
89 this.add(promise);
90 }
91 }
92 }
93
94 /**
95 * Add a promise to possibly be resolved.

Callers

nothing calls this directly

Calls 1

addMethod · 0.95

Tested by

no test coverage detected