build: upgrade to TypeScript 2.8 (#23782)

PR Close #23782
This commit is contained in:
Lucas Sloan
2018-05-08 13:37:54 -07:00
committed by Alex Rickabaugh
parent e5e5c24d48
commit 5cf82f8f3f
15 changed files with 127 additions and 33 deletions

View File

@ -64,7 +64,7 @@ export function create(info: any /* ts.server.PluginCreateInfo */): ts.LanguageS
}
function typescriptOnly(ls: ts.LanguageService): ts.LanguageService {
return {
const languageService: ts.LanguageService = {
cleanupSemanticCache: () => ls.cleanupSemanticCache(),
getSyntacticDiagnostics: tryFilenameCall(ls.getSyntacticDiagnostics),
getSemanticDiagnostics: tryFilenameCall(ls.getSemanticDiagnostics),
@ -117,8 +117,13 @@ export function create(info: any /* ts.server.PluginCreateInfo */): ts.LanguageS
getDefinitionAndBoundSpan: tryFilenameOneCall(ls.getDefinitionAndBoundSpan),
getCombinedCodeFix:
(scope: ts.CombinedCodeFixScope, fixId: {}, formatOptions: ts.FormatCodeSettings) =>
tryCall(undefined, () => ls.getCombinedCodeFix(scope, fixId, formatOptions))
};
tryCall(undefined, () => ls.getCombinedCodeFix(scope, fixId, formatOptions)),
// TODO(kyliau): dummy implementation to compile with ts 2.8, create real one
getSuggestionDiagnostics: (fileName: string) => [],
// TODO(kyliau): dummy implementation to compile with ts 2.8, create real one
organizeImports: (scope: ts.CombinedCodeFixScope, formatOptions: ts.FormatCodeSettings) => [],
} as ts.LanguageService;
return languageService;
}
oldLS = typescriptOnly(oldLS);