While perusing the documentation for Angular's "AsyncPipe", I found myself at a standstill on line 26, where the 'resolve' function is invoked: this.resolve !('hi there!');
I have some questions on my mind:
- (A) Where is the implementation of this function located? After experimenting with different parameters and types such as
resolve(1, 'hello', true)
,resolve(1)
, orresolve()
, I noticed that in every scenario, the value of the FIRST parameter was returned (an empty output in the last case), even though I couldn't find where this function is defined. - (B) Line 19 specifies the
Promise
with<string>
, but as seen in (A), I successfully passed and received strings, numbers, booleans... Did I misconstrue the purpose of this typing?
Any insights would be greatly appreciated!