fix: don't show state_referenced_locally warning on types#13177
fix: don't show state_referenced_locally warning on types#13177dummdidumm merged 5 commits intomainfrom
state_referenced_locally warning on types#13177Conversation
🦋 Changeset detectedLatest commit: 59f53d0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
dummdidumm
left a comment
There was a problem hiding this comment.
Inside compiler/index.js#compile we're stripping away type annotations before passing it on to the analysis phase etc - I think the better fix would be to strip those types there, i.e. investigate why they aren't removed within remove_typescript_nodes
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
state_referenced_locally in types declarationsstate_referenced_locally warning on types
Uh i missed this...gonna take a look 😉 |
We were simply missing a visitor for type annotations. Much better fix, thanks |
|
If we want to adjust this in the future, an alternative would be to adjust |
That would be actually better and useful |
Svelte 5 rewrite
Closes #13173
I had to add a ts-ignore because the types for the types declaration are not in the
pathtypes and i don't think they are worth adding.Please note that the Svelte codebase is currently being rewritten for Svelte 5. Changes should target Svelte 5, which lives on the default branch (
main).If your PR concerns Svelte 4 (including updates to svelte.dev.docs), please ensure the base branch is
svelte-4and notmain.Before submitting the PR, please make sure you do the following
feat:,fix:,chore:, ordocs:.Tests and linting
pnpm testand lint the project withpnpm lint