Skip to content

Wrong svelte/elements types loaded #2109

@dummdidumm

Description

@dummdidumm

Describe the bug

When svelte-jsx(-v4).dts does import('svelte/elements') TypeScript resolves this to the Svelte typings of the language tools extension. But it should resolve it to the user's implementation instead.

Reproduction

Replace the svelte:options entry in svelte-jsx-v4.d.ts with 'svelte:options': import('svelte/elements').SvelteHTMLElements['svelte:options'];, then observe that in intellisense it still does not provide any type hints. Then click on the import and see that it directs you to the language tools' version of Svelte.

Expected behaviour

Should use user's implementation

System Info

irrelevant

Which package is the issue about?

svelte-language-server

Additional Information, eg. Screenshots

@jasonlyu123 do you have any idea how we could make this work? At runtime we have importPackage, but we don't have that here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixedFixed in master branch. Pending production release.bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions