refactor: update angular to support TypeScript 2.4
Detailed updates: - rxjs@5.0.x - tsickle@0.24.x - typescript@2.4.x - @bazel/typescript@0.10.0 - protractor@5.1.x - selenium-webdriver@3.0.x BREAKING CHANGE: - the Angular compiler now requires TypeScript 2.4.x.
This commit is contained in:

committed by
Matias Niemelä

parent
112e777b90
commit
ca5aebaa6b
@ -67,7 +67,10 @@ function angularOnlyFilter(ls: ts.LanguageService): ts.LanguageService {
|
||||
getCodeFixesAtPosition: (fileName, start, end, errorCodes) => <ts.CodeAction[]>[],
|
||||
getEmitOutput: fileName => <ts.EmitOutput><any>undefined,
|
||||
getProgram: () => ls.getProgram(),
|
||||
dispose: () => ls.dispose()
|
||||
dispose: () => ls.dispose(),
|
||||
getApplicableRefactors: (fileName, positionOrRaneg) => <ts.ApplicableRefactorInfo[]>[],
|
||||
getEditsForRefactor: (fileName, formatOptions, positionOrRange, refactorName, actionName) =>
|
||||
undefined,
|
||||
};
|
||||
}
|
||||
|
||||
@ -162,7 +165,10 @@ export function create(info: any /* ts.server.PluginCreateInfo */): ts.LanguageS
|
||||
getCodeFixesAtPosition: tryFilenameFourCall(ls.getCodeFixesAtPosition),
|
||||
getEmitOutput: tryFilenameCall(ls.getEmitOutput),
|
||||
getProgram: () => ls.getProgram(),
|
||||
dispose: () => ls.dispose()
|
||||
dispose: () => ls.dispose(),
|
||||
getApplicableRefactors: (fileName, positionOrRaneg) => <ts.ApplicableRefactorInfo[]>[],
|
||||
getEditsForRefactor: (fileName, formatOptions, positionOrRange, refactorName, actionName) =>
|
||||
undefined,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -147,6 +147,8 @@ export class MockTypescriptHost implements ts.LanguageServiceHost {
|
||||
return fs.existsSync(effectiveName);
|
||||
}
|
||||
|
||||
fileExists(fileName: string): boolean { return this.getRawFileContent(fileName) != null; }
|
||||
|
||||
getMarkerLocations(fileName: string): {[name: string]: number}|undefined {
|
||||
let content = this.getRawFileContent(fileName);
|
||||
if (content) {
|
||||
|
@ -259,7 +259,7 @@ function expectEntries(locationMarker: string, info: ts.CompletionInfo, ...names
|
||||
function expectNoDiagnostics(diagnostics: ts.Diagnostic[]) {
|
||||
for (const diagnostic of diagnostics) {
|
||||
let message = ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n');
|
||||
if (diagnostic.start) {
|
||||
if (diagnostic.file && diagnostic.start) {
|
||||
let {line, character} = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start);
|
||||
console.error(`${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user