fix(compiler): cleanly compile with TypeScript 2.4 (#18456)

This commit is contained in:
Chuck Jazdzewski 2017-08-02 16:26:42 -07:00 committed by Victor Berchet
parent e25b3dd163
commit 7c47b62a96
2 changed files with 3 additions and 3 deletions

View File

@ -459,7 +459,7 @@ export class MockStaticSymbolResolverHost implements StaticSymbolResolverHost {
const errors = const errors =
diagnostics diagnostics
.map(d => { .map(d => {
const {line, character} = ts.getLineAndCharacterOfPosition(d.file, d.start); const {line, character} = ts.getLineAndCharacterOfPosition(d.file !, d.start !);
return `(${line}:${character}): ${d.messageText}`; return `(${line}:${character}): ${d.messageText}`;
}) })
.join('\n'); .join('\n');

View File

@ -559,8 +559,8 @@ export function expectNoDiagnostics(program: ts.Program) {
function lineInfo(diagnostic: ts.Diagnostic): string { function lineInfo(diagnostic: ts.Diagnostic): string {
if (diagnostic.file) { if (diagnostic.file) {
const start = diagnostic.start; const start = diagnostic.start !;
let end = diagnostic.start + diagnostic.length; let end = diagnostic.start ! + diagnostic.length !;
const source = diagnostic.file.text; const source = diagnostic.file.text;
let lineStart = start; let lineStart = start;
let lineEnd = end; let lineEnd = end;