-
-
Notifications
You must be signed in to change notification settings - Fork 223
Closed
Labels
FixedFixed in master branch. Pending production release.Fixed in master branch. Pending production release.feature requestNew feature or requestNew feature or request
Description
Describe the bug
Svelte extension is unable to infer the generic type of a component (in .svelte file) from props
To Reproduce
Steps to reproduce the behavior:
A.svelte
<script>
export let prop
</script>
A.svelte.d.ts
export default class A<T> extends SvelteComponentTyped<{prop:T}>
App.svelte
<script>
import A from './A.svelte'
</script>
// type inference work for prop but not for the component
<A prop={3} />
Expected behavior
Component declared with generics should infer the types from props
Screenshots
If applicable, add screenshots to help explain your problem.


Type inference works fine when the component instantiated in a js file

System (please complete the following information):
- OS: Windows
- IDE: VSCode
- Plugin/Package: Svelte for VSCode
Metadata
Metadata
Assignees
Labels
FixedFixed in master branch. Pending production release.Fixed in master branch. Pending production release.feature requestNew feature or requestNew feature or request