Skip to content

Commit 6cfb0d2

Browse files
authored
fix: revert waiting for config request in ts plugin (#2352)
The change in #2317 to wait for the "enable" request the extension sends lead to all TS files that use Svelte files and part of the initial tsconfig files getting all kinds of type errors because they were already loaded before the enable kicks in
1 parent 8236f63 commit 6cfb0d2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

packages/typescript-plugin/src/config-manager.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,13 @@ export class ConfigManager {
3030
}
3131

3232
updateConfigFromPluginConfig(config: Configuration) {
33-
const shouldWaitForConfigRequest = config.global == true;
34-
const enable = config.enable ?? !shouldWaitForConfigRequest;
33+
// TODO this doesn't work because TS will resolve/load files already before we get the config request,
34+
// which leads to TS files that use Svelte files getting all kinds of type errors
35+
// const shouldWaitForConfigRequest = config.global == true;
36+
// const enable = config.enable ?? !shouldWaitForConfigRequest;
3537
this.config = {
3638
...this.config,
37-
...config,
38-
enable
39+
...config
3940
};
4041
this.emitter.emit(configurationEventName, config);
4142
}

0 commit comments

Comments
 (0)