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

Add support for @defaultValue TSDoc tag #473

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jrolfs
Copy link

@jrolfs jrolfs commented Mar 6, 2023

This adds support for the @defaultValue tag from the TSDoc specification. The existence of both specs can be pretty confusing because there's quite a bit of overlap, but I think ultimately what we're writing in .ts files is TSDoc as it doesn't include the type information like JSDoc does. I kept support for the @default tag both for backward compatibility and because TypeScript does support actual JSDoc in .js files, though I'm not sure whether this tool actually does support that case.

For reference:

I'm happy to address any feedback and thanks for this wonderful tool!

@jrolfs jrolfs force-pushed the feature/support-default-value-tag branch from f258f7c to 49e5cb4 Compare March 6, 2023 20:47
@jrolfs
Copy link
Author

jrolfs commented Mar 6, 2023

It may also be worth considering the use case identified in #457, though I think we'd probably want to add an option like preferDefaultTag to optionally force @default and @defaultValue to take precedence over the default assignment in a component.

@BAISTM
Copy link

BAISTM commented Sep 8, 2023

What's the status of this PR?

Thank you for your response :)

@jrolfs
Copy link
Author

jrolfs commented Sep 15, 2023

Hey @BAISTM, I think this project may be a little stalled out. At this point, a fork may be our best option. I don't have an acute need for this at the moment, but if I return to the work that prompted this PR, I may get a fork going and release something from there. In which case, I'll let you know here.

@pvasek
Copy link
Collaborator

pvasek commented Sep 16, 2023

Hi guys, @jrolfs you are right. I tried to open a discussion about it here #494.

@BAISTM
Copy link

BAISTM commented Sep 19, 2023

@jrolfs Thank you for your response, I already did a work-around in my project. The fork can be a good solution if someone can ensure it's maintainability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants