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
svelte-check outputs parse errors and type errors when a component handles custom events with a period in their name:
c:\code\main\src\routes\home\+page.svelte:189:8
Error: Identifier expected. (ts)
c:\code\main\src\routes\home\+page.svelte:189:86
Error: Unexpected token. Did you mean `{'>'}` or `>`? (ts)
c:\code\main\src\routes\home\+page.svelte:189:89
Error: Expected corresponding closing tag for JSX fragment. (ts)
c:\code\main\src\routes\home\+page.svelte:189:6
Error: Type '{ onhidden: true; }' is not assignable to type 'HTMLProps<HTMLDivElement>'.
Property 'onhidden' does not exist on type 'HTMLProps<HTMLDivElement>'. Did you mean 'hidden'? (ts)
Reproduction
I added the following to my app.d.ts file per the comments in #1563:
VSCode doesn't show any errors for this code, and when I build my app the event is handled as expected. However, when I run svelte-check, it produces 4 parse/type errors from the above line in the component.
Expected behaviour
svelte-check should be able to parse custom event names containing periods, and not output errors.
System Info
OS: Windows 11
IDE: VSCode
Which package is the issue about?
svelte-check
Additional Information, eg. Screenshots
No response
The text was updated successfully, but these errors were encountered:
@jasonlyu123 No, I somehow missed that the --use-new-transformation flag had to be added to the svelte-check script. That does indeed make the error go away! Is there a reason it isn't enabled by default?
It'll be soon. You can see the new transformation roadmap here #1552. We want to test out the new typing format before adding it to the svelte core. And there'll be a new major version for svelte-check which enable new transformation by default.
Describe the bug
svelte-check
outputs parse errors and type errors when a component handles custom events with a period in their name:Reproduction
I added the following to my
app.d.ts
file per the comments in #1563:In my component I have this Bootstrap modal element:
VSCode doesn't show any errors for this code, and when I build my app the event is handled as expected. However, when I run
svelte-check
, it produces 4 parse/type errors from the above line in the component.Expected behaviour
svelte-check
should be able to parse custom event names containing periods, and not output errors.System Info
Which package is the issue about?
svelte-check
Additional Information, eg. Screenshots
No response
The text was updated successfully, but these errors were encountered: