|
@@ -313,14 +313,18 @@ export class TypeScriptWorker implements ts.LanguageServiceHost, ITypeScriptWork
|
|
formatOptions: ts.FormatCodeOptions
|
|
formatOptions: ts.FormatCodeOptions
|
|
): Promise<ReadonlyArray<ts.CodeFixAction>> {
|
|
): Promise<ReadonlyArray<ts.CodeFixAction>> {
|
|
const preferences = {};
|
|
const preferences = {};
|
|
- return this._languageService.getCodeFixesAtPosition(
|
|
|
|
- fileName,
|
|
|
|
- start,
|
|
|
|
- end,
|
|
|
|
- errorCodes,
|
|
|
|
- formatOptions,
|
|
|
|
- preferences
|
|
|
|
- );
|
|
|
|
|
|
+ try {
|
|
|
|
+ return this._languageService.getCodeFixesAtPosition(
|
|
|
|
+ fileName,
|
|
|
|
+ start,
|
|
|
|
+ end,
|
|
|
|
+ errorCodes,
|
|
|
|
+ formatOptions,
|
|
|
|
+ preferences
|
|
|
|
+ );
|
|
|
|
+ } catch {
|
|
|
|
+ return [];
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
async updateExtraLibs(extraLibs: IExtraLibs): Promise<void> {
|
|
async updateExtraLibs(extraLibs: IExtraLibs): Promise<void> {
|