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

Method constructor

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

Constructor.

()

Source from the content-addressed store, hash-verified

44export class Deferred {
45 /** Constructor. */
46 constructor() {
47 /** @const {Promise<T>} */
48 this.promise = new /*OK*/ Promise((res, rej) => {
49 /** @const {function(T=)} */
50 this.resolve = res;
51 /** @const {function(*=)} */
52 this.reject = rej;
53 });
54 }
55}
56
57/**

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected