(onrejected?: (reason: any) => never)
| 15 | return (this.#promise ??= Promise.resolve(typeof this.initializer === 'function' ? is.Constructor(this.initializer) ? new this.initializer() : (this.initializer as () => T | Promise<T>)() : this.initializer)).then(onfulfilled, onrejected); |
| 16 | } |
| 17 | override catch(onrejected?: (reason: any) => never): Promise<T> { |
| 18 | return (this.#promise ??= Promise.resolve(typeof this.initializer === 'function' ? is.Constructor(this.initializer) ? new this.initializer() : (this.initializer as () => T | Promise<T>)() : this.initializer)).catch(onrejected); |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | /** Returns a promise from a value (value/lambda/constructor) that isn't resolved until is is awaited. */ |
no test coverage detected