diff options
Diffstat (limited to 'cli/tsc')
-rw-r--r-- | cli/tsc/99_main_compiler.js | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/cli/tsc/99_main_compiler.js b/cli/tsc/99_main_compiler.js index 32c3bf035..e6123d25e 100644 --- a/cli/tsc/99_main_compiler.js +++ b/cli/tsc/99_main_compiler.js @@ -503,9 +503,6 @@ delete Object.prototype.__proto__; } } - /** @type {ts.CompilerOptions} */ - let compilationSettings = {}; - /** @type {ts.LanguageService} */ let languageService; @@ -720,7 +717,17 @@ delete Object.prototype.__proto__; if (logDebug) { debug("host.getCompilationSettings()"); } - return compilationSettings; + const tsConfig = normalizeConfig(ops.op_ts_config()); + const { options, errors } = ts + .convertCompilerOptionsFromJson(tsConfig, ""); + Object.assign(options, { + allowNonTsExtensions: true, + allowImportingTsExtensions: true, + }); + if (errors.length > 0 && logDebug) { + debug(ts.formatDiagnostics(errors, host)); + } + return options; }, getScriptFileNames() { if (logDebug) { @@ -1010,21 +1017,6 @@ delete Object.prototype.__proto__; serverRestart(); return respond(id, true); } - case "$configure": { - const config = normalizeConfig(args[0]); - const { options, errors } = ts - .convertCompilerOptionsFromJson(config, ""); - Object.assign(options, { - allowNonTsExtensions: true, - allowImportingTsExtensions: true, - }); - if (errors.length > 0 && logDebug) { - debug(ts.formatDiagnostics(errors, host)); - } - compilationSettings = options; - moduleSpecifierCache.clear(); - return respond(id, true); - } case "$getSupportedCodeFixes": { return respond( id, |