-
Notifications
You must be signed in to change notification settings - Fork 7
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
Information about function arguments is not parsed from method JSDoc #39
Comments
I was about to open an issue for this. /** @param {string} [question=Why?] a question about life, the universe, everything */ then the output would be: "params": [
{
"type": {
"kind": "type",
"text": "string",
"type": "string"
},
"name": "question",
"optional": true,
"default": "Why?",
"description": "a question about life, the universe, everything"
}
], I propose to override each This is a breaking change because method item |
- Add function getDefaultJSDocType - Update tests for svelte3/integration/methods - Fix typings for SvelteMethodItem - Add example usage
Optional and default should be alredy done by JSDoc parser. |
Ok, seems good. I added some comments in the Some questions:
|
Yes, that is a good time to cleanup |
When we can't parse name of parameter, so, that is ok to skip all
Actually,
Lets keep this optional. When you done with your PRs I plan to review output API and extend documentation in |
I'm not totally sure about lib/parser.js#L232: entry.args = entry.value.params.map((param) => param.name); Should I remove this? It does not have the same format as the other, just an array of string. |
That a svelte2 format, looks like that I'm maintaine correctly the support of function arguments. So, you should update it with new format. |
Ok thanks. I ended up doing that. It's included in #40. |
fix(v3-parser): Export metadata for method.param items (#39)
Svelte3 parser is not output detailed information about function arguments that stored in JSDoc.
The following example shows the issue:
component.svelte
output.json
But expected the full information about argument, like this:
The text was updated successfully, but these errors were encountered: