fix(compiler): cleanly compile with TypeScript 2.4 (#18456)
This commit is contained in:
parent
e25b3dd163
commit
7c47b62a96
|
@ -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');
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue