Skip to content

Commit 7c47b62

Browse files
chuckjazvicb
authored andcommitted
fix(compiler): cleanly compile with TypeScript 2.4 (#18456)
1 parent e25b3dd commit 7c47b62

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/compiler/test/aot/static_symbol_resolver_spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ export class MockStaticSymbolResolverHost implements StaticSymbolResolverHost {
459459
const errors =
460460
diagnostics
461461
.map(d => {
462-
const {line, character} = ts.getLineAndCharacterOfPosition(d.file, d.start);
462+
const {line, character} = ts.getLineAndCharacterOfPosition(d.file !, d.start !);
463463
return `(${line}:${character}): ${d.messageText}`;
464464
})
465465
.join('\n');

packages/compiler/test/aot/test_util.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,8 +559,8 @@ export function expectNoDiagnostics(program: ts.Program) {
559559

560560
function lineInfo(diagnostic: ts.Diagnostic): string {
561561
if (diagnostic.file) {
562-
const start = diagnostic.start;
563-
let end = diagnostic.start + diagnostic.length;
562+
const start = diagnostic.start !;
563+
let end = diagnostic.start ! + diagnostic.length !;
564564
const source = diagnostic.file.text;
565565
let lineStart = start;
566566
let lineEnd = end;

0 commit comments

Comments
 (0)