build: TypeScript 3.6 compatibility. (#32908)

This PR updates Angular to compile with TypeScript 3.6 while retaining
compatibility with TS3.5. We achieve this by inserting several `as any`
casts for compatiblity around `ts.CompilerHost` APIs.

PR Close #32908
This commit is contained in:
Martin Probst
2019-09-27 16:16:10 +02:00
committed by atscott
parent 6f5f481fda
commit 5332b04f35
12 changed files with 42 additions and 26 deletions

View File

@ -277,7 +277,7 @@ export class PlatformRef {
const ngZoneInjector = Injector.create(
{providers: providers, parent: this.injector, name: moduleFactory.moduleType.name});
const moduleRef = <InternalNgModuleRef<M>>moduleFactory.create(ngZoneInjector);
const exceptionHandler: ErrorHandler = moduleRef.injector.get(ErrorHandler, null);
const exceptionHandler: ErrorHandler|null = moduleRef.injector.get(ErrorHandler, null);
if (!exceptionHandler) {
throw new Error('No ErrorHandler. Is platform module (BrowserModule) included?');
}