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

Grab '@param' tags from initializers #4979

Merged
merged 3 commits into from
Sep 26, 2015

Conversation

DanielRosenwasser
Copy link
Member

Addresses @zhengbli's concern in #4978 (comment).

This PR enables us to grab parameters from a "simple"/"canonical" callable/constructable expression in a variable statement with a single declaration.

We only do this for a function expression, arrow function, or class expression with a constructor, or any of the aforementioned in nested parentheses.

In the presence of a class expression, if there are multiple constructor declarations, the parameters are acquired from the first one.

We only do this for a (parenthesized) function expression, arrow function,
or class expression with a constructor.

In the presence of a class expression, if there are multiple constructor
declarations, the parameters are acquired from the first one.

/**
* Digs into an an initializer or RHS operand of an assignment operation
* to get the parameters from an apst signature corresponding to a
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apt*

@mhegazy
Copy link
Contributor

mhegazy commented Sep 25, 2015

👍

3 similar comments
@RyanCavanaugh
Copy link
Member

👍

@vladima
Copy link
Contributor

vladima commented Sep 26, 2015

👍

@zhengbli
Copy link
Contributor

👍

DanielRosenwasser added a commit that referenced this pull request Sep 26, 2015
@DanielRosenwasser DanielRosenwasser merged commit 8205a0a into JSDocAndJSModules Sep 26, 2015
@DanielRosenwasser DanielRosenwasser deleted the grabParamsFromInitializers branch September 26, 2015 00:12
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants