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

Initial attempt to parse default values for arrays #4

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

Conversation

gotnone
Copy link

@gotnone gotnone commented Jul 15, 2020

This patch allows default values to be specified for array types in jsdoc schema comments.

@gotnone
Copy link
Author

gotnone commented Jul 15, 2020

While working on this patch I am leaning toward running all schema.default values through JSON.parse(). If that also makes sense to you, I can rework the patch to drop the extra switch statement underneath the default tag case. This should then cover any* primitives that can be represented in JSON (*BigInt may require something like json-bigint for proper parsing).

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.

1 participant