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 =
|
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');
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue