* Creates an instance of Signals.
()
| 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 |