Transforms async @Component methods that use await or .toPromise():
Removes async, await and .toPromise() from the method.
In ngOnInit, adds an Observable<unknown> property <name>$ for each
this.<name> = ... assignment, with a TODO comment to switch the
template to the async pipe. Template files are not changed.
Removes detectChanges() calls.
Adds the Observable import from rxjs when missing.
Restores the original source text when a step throws.
Transforms async
@Componentmethods that useawaitor.toPromise():async,awaitand.toPromise()from the method.ngOnInit, adds anObservable<unknown>property<name>$for eachthis.<name> = ...assignment, with a TODO comment to switch the template to the async pipe. Template files are not changed.detectChanges()calls.Observableimport fromrxjswhen missing.Restores the original source text when a step throws.