浏览代码

Publicly expose getters for the lang server and extra libs

Orta 3 年之前
父节点
当前提交
85d22afc03
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      src/tsWorker.ts

+ 8 - 0
src/tsWorker.ts

@@ -54,6 +54,14 @@ export class TypeScriptWorker implements ts.LanguageServiceHost, ITypeScriptWork
 		return this._compilerOptions;
 	}
 
+	getLanguageService(): ts.LanguageService {
+		return this._languageService;
+	}
+
+	getExtraLibs(): IExtraLibs {
+		return this._extraLibs;
+	}
+
 	getScriptFileNames(): string[] {
 		const allModels = this._ctx.getMirrorModels().map((model) => model.uri);
 		const models = allModels.filter((uri) => !fileNameIsLib(uri)).map((uri) => uri.toString());