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
docs: update requirements for generated types #12071
base: main
Are you sure you want to change the base?
Conversation
|
51c80dc
to
b56a75c
Compare
@@ -96,7 +96,7 @@ export async function load({ params, fetch }) { | |||
} | |||
``` | |||
|
|||
> For this to work, your own `tsconfig.json` or `jsconfig.json` should extend from the generated `.svelte-kit/tsconfig.json` (where `.svelte-kit` is your [`outDir`](configuration#outdir)): | |||
> For this to work, your own `tsconfig.json` or `jsconfig.json` should extend from the generated `.svelte-kit/tsconfig.json` (where `.svelte-kit` is your [`outDir`](configuration#outdir)) and typescript should be installed as a dependency: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
> For this to work, your own `tsconfig.json` or `jsconfig.json` should extend from the generated `.svelte-kit/tsconfig.json` (where `.svelte-kit` is your [`outDir`](configuration#outdir)) and typescript should be installed as a dependency: | |
> For this to work, your own `tsconfig.json` or `jsconfig.json` should extend from the generated `.svelte-kit/tsconfig.json` (where `.svelte-kit` is your [`outDir`](configuration#outdir)) and TypeScript should be installed as a dependency: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done 👍
Clarifies that Typescript is required as a dependency for generated types to be created. When the dependency is missing they are silently omitted. This requirement may not be obvious to those who are running a vanilla JavaScript project and have not used the scaffolding script (e.g. because they migrated from an earlier version of SvelteKit).
Is this good to go now? |
Clarifies that Typescript is required as a dependency for generated types to be created. When the dependency is missing they are silently omitted. This requirement may not be obvious to those who are running a vanilla JavaScript project and have not used the scaffolding script (e.g. because they migrated from an earlier version of SvelteKit).
I came across this issue because I migrated from an alpha version and spent a while scratching my head before realising why the new generated types were not working for me.
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm test
and lint the project withpnpm lint
andpnpm check
Changesets
pnpm changeset
and following the prompts. Changesets that add features should beminor
and those that fix bugs should bepatch
. Please prefix changeset messages withfeat:
,fix:
, orchore:
.Edits