-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
/// <reference types="@sveltejs/kit" /> isn't work as intended. #2863
Comments
|
This is a typescript bug which is tracked at microsoft/TypeScript#46860 . If you downgrade to 4.4 you won't get the issue. I think we can fix it on our end in the meantime as well though, will look into that later. |
I tried with 4.4.4. |
here is my
|
Hmm if |
The VSCode using |
Fixes #2863 Also removes somewhat weird types export "./types" which is redundant: you get these through the default import, too.
Fixes #2863 Also removes somewhat weird types export "./types" which is redundant: you get these through the default import, too. Co-authored-by: Simon Holthausen <[email protected]>
Describe the bug
In the latest version of sveltekit reference type declarations in the global.d.ts file isn't work as intended.
When I run
tsc --noEmit
it will get back with the following errors:Extending types with these types will solve the problem.
I think would be better using the references rather than this.
If I remove these options and /// from the global.d.ts, the result will be the same.
AFAIK all of the added compilerOpt types is imported & exported in @sveltejs/kit, but isn't works as it has to.
Reproduction
Install a fresh svelte kit template and turn into typescript.
Update packages.
Try using env declarations.
run
tsc --noEmit
Logs
Severity
serious, but I can work around it
Additional Information
Extending types with these types will solve the problem.
I think would be better using the references rather than this.
The text was updated successfully, but these errors were encountered: