Skip to content
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

Svelte: Use JSDocs in JS CLI templates and put manual enum arg type back as it is not inferred #20042

Merged
merged 2 commits into from
Dec 1, 2022

Conversation

kasperpeulen
Copy link
Contributor

@kasperpeulen kasperpeulen commented Dec 1, 2022

What I did

  • Svelte: Use JSDocs and put manual enum arg type back as it is not inferred

@kasperpeulen kasperpeulen added svelte bug ci:daily Run the CI jobs that normally run in the daily job. labels Dec 1, 2022
Copy link
Contributor

@JReinhold JReinhold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably support typing with JSDocs (and testing it in CI) as that is a fairly common thing in the Svelte community. But that's outside the scope of this PR.

Unless we already support it, then I think we should add JSDocs to props instead of defining argTypes manually.

@kasperpeulen kasperpeulen force-pushed the kasper/manual-arg-types-svelte-js branch from 83910db to 0f891f9 Compare December 1, 2022 10:05
@kasperpeulen kasperpeulen force-pushed the kasper/manual-arg-types-svelte-js branch from 0f891f9 to 3d3265e Compare December 1, 2022 10:06
@kasperpeulen kasperpeulen changed the title Svelte: Specify arg types manually in JS CLI templates Svelte: Use JSDocs in JS CLI templates and put manual enum arg type back as it is not inferred Dec 1, 2022
@kasperpeulen
Copy link
Contributor Author

@JReinhold

We should probably support typing with JSDocs (and testing it in CI) as that is a fairly common thing in the Svelte community. But that's outside the scope of this PR.

JSDocs actually work! (except for enums/string literal unions) So I use that and only specify the argType for the enum. Thanks! 🚀

@kasperpeulen kasperpeulen removed the ci:daily Run the CI jobs that normally run in the daily job. label Dec 1, 2022
@kasperpeulen kasperpeulen marked this pull request as draft December 1, 2022 10:40
@kasperpeulen kasperpeulen marked this pull request as ready for review December 1, 2022 10:40
@kasperpeulen kasperpeulen merged commit 157f76a into next Dec 1, 2022
@kasperpeulen kasperpeulen deleted the kasper/manual-arg-types-svelte-js branch December 1, 2022 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants