build: upgrade to TypeScript 2.6 (#21144)

Fixes #20653

PR Close #21144
This commit is contained in:
Chuck Jazdzewski
2017-12-22 09:36:47 -08:00
committed by Igor Minar
parent 83c1383701
commit 83d207d0a7
45 changed files with 331 additions and 215 deletions

View File

@ -172,7 +172,7 @@ export class EmittingCompilerHost implements ts.CompilerHost {
writeFile: ts.WriteFileCallback =
(fileName: string, data: string, writeByteOrderMark: boolean,
onError?: (message: string) => void, sourceFiles?: ts.SourceFile[]) => {
onError?: (message: string) => void, sourceFiles?: ReadonlyArray<ts.SourceFile>) => {
this.addWrittenFile(fileName, data);
if (this.options.emitMetadata && sourceFiles && sourceFiles.length && DTS.test(fileName)) {
const metadataFilePath = fileName.replace(DTS, '.metadata.json');
@ -430,7 +430,7 @@ export class MockMetadataBundlerHost implements MetadataBundlerHost {
getMetadataFor(moduleName: string): ModuleMetadata|undefined {
const source = this.host.getSourceFile(moduleName + '.ts', ts.ScriptTarget.Latest);
return this.collector.getMetadata(source);
return source && this.collector.getMetadata(source);
}
}
@ -603,7 +603,7 @@ export function expectNoDiagnostics(program: ts.Program) {
return '';
}
function expectNoDiagnostics(diagnostics: ts.Diagnostic[]) {
function expectNoDiagnostics(diagnostics: ReadonlyArray<ts.Diagnostic>) {
if (diagnostics && diagnostics.length) {
throw new Error(
'Errors from TypeScript:\n' +