mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(docs-infra): workaround for broken 'import as' (#27536)
It's unclear why `import as` results in the aliases to be undefined. Plain tsc seems to do the right thing and emits the correct code, so it might be some kind of interaction in @angular/cli or webpack that are causing the failure. This should be investigated separately from the tsc update in angular/angular. See angular/angular-cli#13212 PR Close #27536
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
import { from as fromPromise, Observable } from 'rxjs';
|
||||
import { from, Observable } from 'rxjs';
|
||||
import { first, map, share } from 'rxjs/operators';
|
||||
|
||||
import { Logger } from 'app/shared/logger.service';
|
||||
@@ -20,7 +20,7 @@ export class PrettyPrinter {
|
||||
private prettyPrintOne: Observable<PrettyPrintOne>;
|
||||
|
||||
constructor(private logger: Logger) {
|
||||
this.prettyPrintOne = fromPromise(this.getPrettyPrintOne()).pipe(share());
|
||||
this.prettyPrintOne = from(this.getPrettyPrintOne()).pipe(share());
|
||||
}
|
||||
|
||||
private getPrettyPrintOne(): Promise<PrettyPrintOne> {
|
||||
|
||||
Reference in New Issue
Block a user