Skip to content
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 @sveltejs/kit types from generated config #5677

Closed
Rich-Harris opened this issue Jul 22, 2022 · 0 comments · Fixed by #5745
Closed

Reference @sveltejs/kit types from generated config #5677

Rich-Harris opened this issue Jul 22, 2022 · 0 comments · Fixed by #5745

Comments

@Rich-Harris
Copy link
Member

Describe the problem

For TypeScript to see SvelteKit's ambient types ($app/paths and so on) you have to reference them:

/// <reference types="@sveltejs/kit" /> 

Typically this happens in src/app.d.ts. But there's lots of reasons why that might not be the case (e.g. a project was initialised without types). It'd be more reliable if the types were referenced automatically.

Describe the proposed solution

#5663 will introduce generated ambient types — once that's merged, it should be straightforward to reference the existing ambient types from there, or directly in the generated tsconfig.

Alternatives considered

No response

Importance

nice to have

Additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant