-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
TypeScript: svelte-kit package does not copy custom event payload types #1943
Comments
Is this working when using simple types like |
@dummdidumm No, not working with string, number, boolean, undefined and null and even Symbol, so I guess the prblem is with any kind of type |
This makes the DOM ambient typings available to the user without errors. This is not 100% correct because on the server most of the typings are not available, but as soon as you want to use one of these, you need to add this to the lib list anyway. It also makes the svelte-kit package command export the correct dispatcher event types (#1943).
You need to add |
This makes the DOM ambient typings available to the user without errors. This is not 100% correct because on the server most of the typings are not available, but as soon as you want to use one of these, you need to add this to the lib list anyway. It also makes the svelte-kit package command export the correct dispatcher event types (#1943).
Thank you! |
Describe the bug
I'm using
svelte-kit package
command(which is amazing BTW, kudos to you folks for it 😍). In the component, I have defined createEventDispatcher types as below 👇the
start
event has payload of typeWindow
(just for a sample demo, final would be different). So when I run thesvelte-kit package
command, everything works perfectly, the svelte component is generated flaelessly, thed.ts
is also perfect, with the issue that that the custom types provides for the events are stripped away, and final output has type asany
start
should've had theWindow
typeReproduction
Target source code: https://github.com/PuruVJ/svelte-drag/blob/e1e73f2b44abb76b3e730543a8a89b35141fa74f/src/lib/DraggableCore.svelte#L68-L74
Logs
No response
System Info
Severity
annoying
Additional Information
No response
The text was updated successfully, but these errors were encountered: