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

Method constructor

src/core/data-structures/signals.js:15–33  ·  view source on GitHub ↗

* Creates an instance of Signals.

()

Source from the content-addressed store, hash-verified

13 * Creates an instance of Signals.
14 */
15 constructor() {
16 /**
17 * A mapping from a signal name to the signal response: either time or
18 * an error.
19 * @private @const {{[key: string]: (TimestampDef|Error)}}
20 */
21 this.map_ = map();
22
23 /**
24 * A mapping from a signal name to the signal promise, resolve and reject.
25 * Only allocated when promise has been requested.
26 * @private {?Object<string, {
27 * promise: !Promise,
28 * resolve: (function(!TimestampDef)|undefined),
29 * reject: (function(!Error)|undefined)
30 * }>}
31 */
32 this.promiseMap_ = null;
33 }
34
35 /**
36 * Returns the current known value of the signal. If signal is not yet

Callers

nothing calls this directly

Calls 1

mapFunction · 0.90

Tested by

no test coverage detected