You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This only happens in the new transformation because the suggested variable only exists to check if the variable is a valid component. This seems to be related to how similar the generated variable is to the original component name. So the longer the name of the component, the lower the percentage of the prefix and suffix.
Reproduction
<scriptlang="ts"></script>
<MyLongComponent />
Expected behaviour
The error should be "Cannot find name 'MyLongComponent'" but is "Cannot find name 'MyLongComponent'. Did you mean '$$_MyLongComponent0C' ?".
The quick fix for it should be to import a component with the same name but it's "Change spelling to $$_MyLongComponent0C"
System Info
OS: Windows
IDE: VSCode
Which package is the issue about?
svelte2tsx svelte-language-server
Additional Information, eg. Screenshots
No response
The text was updated successfully, but these errors were encountered:
It seems like if we suffix the variable with an equal number of nonsense characters. like $$_MyLongComponent0C$$$$$$$$$$$$$$$$. TypeScript would stop saying the undeclared variable is a misspelling of the generated variable 😅
Describe the bug
This only happens in the new transformation because the suggested variable only exists to check if the variable is a valid component. This seems to be related to how similar the generated variable is to the original component name. So the longer the name of the component, the lower the percentage of the prefix and suffix.
Reproduction
Expected behaviour
System Info
Which package is the issue about?
svelte2tsx svelte-language-server
Additional Information, eg. Screenshots
No response
The text was updated successfully, but these errors were encountered: