Skip to content

Commit

Permalink
fix: revert waiting for config request in ts plugin
Browse files Browse the repository at this point in the history
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
  • Loading branch information
dummdidumm committed Apr 25, 2024
1 parent 8236f63 commit e6795e2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/typescript-plugin/src/config-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@ export class ConfigManager {
}

updateConfigFromPluginConfig(config: Configuration) {
const shouldWaitForConfigRequest = config.global == true;
const enable = config.enable ?? !shouldWaitForConfigRequest;
// TODO this doesn't work because TS will resolve/load files already before we get the config request,
// which leads to TS files that use Svelte files getting all kinds of type errors
// const shouldWaitForConfigRequest = config.global == true;
// const enable = config.enable ?? !shouldWaitForConfigRequest;
this.config = {
...this.config,
...config,
enable
...config
};
this.emitter.emit(configurationEventName, config);
}
Expand Down

0 comments on commit e6795e2

Please sign in to comment.