diff --git a/packages/compiler/test/aot/static_symbol_resolver_spec.ts b/packages/compiler/test/aot/static_symbol_resolver_spec.ts index eba341aac7..4ee26ff77c 100644 --- a/packages/compiler/test/aot/static_symbol_resolver_spec.ts +++ b/packages/compiler/test/aot/static_symbol_resolver_spec.ts @@ -459,7 +459,7 @@ export class MockStaticSymbolResolverHost implements StaticSymbolResolverHost { const errors = diagnostics .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}`; }) .join('\n'); diff --git a/packages/compiler/test/aot/test_util.ts b/packages/compiler/test/aot/test_util.ts index 93b3c7b25b..7ea8633c78 100644 --- a/packages/compiler/test/aot/test_util.ts +++ b/packages/compiler/test/aot/test_util.ts @@ -559,8 +559,8 @@ export function expectNoDiagnostics(program: ts.Program) { function lineInfo(diagnostic: ts.Diagnostic): string { if (diagnostic.file) { - const start = diagnostic.start; - let end = diagnostic.start + diagnostic.length; + const start = diagnostic.start !; + let end = diagnostic.start ! + diagnostic.length !; const source = diagnostic.file.text; let lineStart = start; let lineEnd = end;