mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
feat(common): added typed overloaded for AsyncPipe.transform() (#14367)
BREAKING CHANGE: Classes that derive from `AsyncPipe` and override `transform()` might not compile correctly. Use of `async` pipe in templates is unaffected. Mitigation: Update derived classes of `AsyncPipe` that override `transform()` to include the type parameter overloads. Related to #12398 PR Close #14367
This commit is contained in:
committed by
Miško Hevery
parent
6b9aa2ca3d
commit
4da7925ad5
+3
-1
@@ -5,7 +5,9 @@ export declare const APP_BASE_HREF: InjectionToken<string>;
|
||||
export declare class AsyncPipe implements OnDestroy, PipeTransform {
|
||||
constructor(_ref: ChangeDetectorRef);
|
||||
ngOnDestroy(): void;
|
||||
transform(obj: Observable<any> | Promise<any> | EventEmitter<any>): any;
|
||||
transform<T>(obj: EventEmitter<T>): T | null;
|
||||
transform<T>(obj: Promise<T>): T | null;
|
||||
transform<T>(obj: Observable<T>): T | null;
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
|
||||
Reference in New Issue
Block a user