Skip to content

[Feature] Manually declare slots/events #24

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

Closed
Nick-Mazuk opened this issue Apr 25, 2021 · 2 comments
Closed

[Feature] Manually declare slots/events #24

Nick-Mazuk opened this issue Apr 25, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@Nick-Mazuk
Copy link

Describe the bug

Currently, this plugin doesn't support TypeScript (#4). This means it doesn't automatically detect props/slots/events.

While you can manually declare props via the argTypes prop on the Meta component, I don't believe you can manually add slots or events. Could be mistaken, though.

While full TypeScript support is preferable, I believe being able to manually declare slots is also a good option to be able to future-proof the addon.

@Nick-Mazuk Nick-Mazuk added the bug Something isn't working label Apr 25, 2021
@j3rem1e
Copy link
Contributor

j3rem1e commented Apr 26, 2021

Typescript supports is not necessary to detect events and slots.

Storybook uses sveltedoc-parser which supports this properties. look at the officiel svelte kitchen sink.

@j3rem1e j3rem1e closed this as completed May 7, 2021
@benbender
Copy link

@j3rem1e Automatic typed CustomEvents are now available in Svelte. See sveltejs/language-tools#424 (comment). Would be nice to reopen this and have them supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants