fix(common): weaken AsyncPipe transform signature (#22169)
The AsyncPipe type signature was changed to allow deferred creation of promises and observalbes that is supported by the implementation by allowing `Promise<T>|null|undefined` and by allowing `Observable<T>|null|undefined`. PR Close #22169
This commit is contained in:

committed by
Miško Hevery

parent
b333919722
commit
be59c3a98c
@ -85,8 +85,8 @@ export class AsyncPipe implements OnDestroy, PipeTransform {
|
||||
|
||||
transform<T>(obj: null): null;
|
||||
transform<T>(obj: undefined): undefined;
|
||||
transform<T>(obj: Observable<T>): T|null;
|
||||
transform<T>(obj: Promise<T>): T|null;
|
||||
transform<T>(obj: Observable<T>|null|undefined): T|null;
|
||||
transform<T>(obj: Promise<T>|null|undefined): T|null;
|
||||
transform(obj: Observable<any>|Promise<any>|null|undefined): any {
|
||||
if (!this._obj) {
|
||||
if (obj) {
|
||||
|
Reference in New Issue
Block a user