-
-
Notifications
You must be signed in to change notification settings - Fork 223
Description
Describe the bug
If one installs some @types/* npm module that somehow overrides React types then type-checking gets messed up. I can imagine why this happens, but it would be nice if it could be fixed somehow. In my case, I'm using storybook (with Svelte) but it installs a bunch of @types/* modules which somehow mess up the types that the language server users. I haven't identified which of the types modules is the culprit. But ideally the language server types should trump other types.
To Reproduce
Steps to reproduce the behavior:
- Install the @storybook/addon-knobs npm module
- Trigger TS types to be loaded somehow, e.g. by importing the module
- Simple HTML now triggers type errors
Example code that triggers the error:
<script lang="typescript">
import * as foo from '@storybook/addon-knobs';
</script>
<div>
<p></p>
</div>
Expected behavior
That the HTML would not trigger an error.
System (please complete the following information):
- OS: Linux
- IDE: VSCode
- Plugin/Package: "Svelte Beta",
svelte-language-server,svelte-check
Additional context
svelte-check also triggers the same errors that show up in the IDE.
