sublimelsp / LSP-typescript

TypeScript, JavaScript support for Sublime LSP plugin
MIT License
134 stars 11 forks source link

Type checking works different from other IDEs #250

Closed moonlitgrace closed 4 months ago

moonlitgrace commented 4 months ago

For exmaple let's take this:

createEffect(() => {
  if (!dotLottie()) return;
  dotLottie().addEventListener('play', console.log);
  dotLottie().addEventListener('freeze', console.log);
});

looks good right? but it shows this error even after guard clause check 2024-06-07_14-41

but on vscode it works fine: 2024-06-07_14-42

Using LSP-Typescript version: 5.0.4

rchl commented 4 months ago

The difference could be that vscode uses different version of typescript. In vscode you can switch which version of TS is used from the status field.

moonlitgrace commented 4 months ago

@rchl thank you for your response. yea but something else is problem, but its good now. closing this... thanks again :)