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

形参解释支持 ESNext #5

Open
chriswong opened this issue Sep 29, 2016 · 0 comments
Open

形参解释支持 ESNext #5

chriswong opened this issue Sep 29, 2016 · 0 comments

Comments

@chriswong
Copy link
Contributor

RT.

比如:

参数默认值

function (a = 1)

对应出的参数注释:

@param {number} [a=1] a [a description]

参数解构:

function ({a, b = false})

对应的参数注释:

@param {[type]} a [a description]
@param {boolean] b [b description]

或者:

@param {Object} param [param description]
@param {[type]} param.a [a description]
@param {boolean] param.b [b description]

上面只是简单举例,真实情况还要考虑混合使用的。

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

No branches or pull requests

1 participant