We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am having some trouble setting the type of an @param to a string[]
@param
string[]
/** * @param{string[]} baz Argument of type string[] * @param {string} bar Argument of type string */
I expected it show that the type of baz is a string[]. Similar to #802, string[], String[], Array.<string>, etc. do not seem to be working either.
baz
String[]
Array.<string>
It looks like the type name is being rendered here:
react-styleguidist/src/client/rsg-components/Argument/ArgumentRenderer.tsx
Line 52 in b409045
When the type is a string, doctrine is giving us { type: 'NameExpression', name: 'string' } so we can get type.name.
string
{ type: 'NameExpression', name: 'string' }
type.name
When the type is a string[], doctrine is giving us:
{ type: 'TypeApplication', expression: { type: 'NameExpression', name: 'Array' }, applications: [ { type: 'NameExpression', name: 'string' } ] }
As a side note, it might be nice to put each argument on a newline.
Would love to hear your thoughts and submit a pull request with some of these changes.
The text was updated successfully, but these errors were encountered:
Yeah, all good points! Feel free to send a pull request! 👾
Sorry, something went wrong.
Fix: Use doctrine to stringify types (fixes styleguidist#1611)
5f6329c
921e8b1
🎉 This issue has been resolved in version 11.0.9 🎉
The release is available on:
Your semantic-release bot 📦🚀
No branches or pull requests
I am having some trouble setting the type of an
@param
to astring[]
I expected it show that the type of
baz
is astring[]
. Similar to #802,string[]
,String[]
,Array.<string>
, etc. do not seem to be working either.It looks like the type name is being rendered here:
react-styleguidist/src/client/rsg-components/Argument/ArgumentRenderer.tsx
Line 52 in b409045
When the type is a
string
, doctrine is giving us{ type: 'NameExpression', name: 'string' }
so we can gettype.name
.When the type is a
string[]
, doctrine is giving us:As a side note, it might be nice to put each argument on a newline.
Would love to hear your thoughts and submit a pull request with some of these changes.
The text was updated successfully, but these errors were encountered: