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

Mark optional property with square brackets #7975

Merged
merged 1 commit into from Mar 13, 2018

Conversation

fredj
Copy link
Member

@fredj fredj commented Mar 12, 2018

No description provided.

@tschaub
Copy link
Member

tschaub commented Mar 12, 2018

Will this also require work on the tools that create the typedefs for the Compiler?

@fredj
Copy link
Member Author

fredj commented Mar 13, 2018

I think it's only for the api doc because the type are already optional (with the undefined type) but that's only a supposition.

@ahocevar
Copy link
Member

ahocevar commented Mar 13, 2018

Will this also require work on the tools that create the typedefs for the Compiler?

The babel-plugin-jsdoc-closure supports this already and creates a proper type for the Compiler.

Copy link
Member

@ahocevar ahocevar left a comment

Choose a reason for hiding this comment

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

Looks good, thanks.

@fredj fredj merged commit 92d864e into openlayers:master Mar 13, 2018
@fredj fredj deleted the jsdoc_default branch March 13, 2018 10:15
* (defaults to `1000`).
* @property {undefined|function(number):number} easing The easing function used
* @property {number|undefined} [duration=1000] The duration of the animation in milliseconds.
* @property {undefined|function(number):number} [easing] The easing function used
Copy link
Member

Choose a reason for hiding this comment

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

Oh sorry for the inaccurate review. You should have removed the undefined in all places where you set the type in square parentheses. The babel-plugin-closure-jsdoc will resolve that to the correct type.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I will do a follow-up pr

Copy link
Member Author

Choose a reason for hiding this comment

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

see #7979

@ahocevar
Copy link
Member

@fredj Can you please create a follow-up pull request to address #7975 (comment)? Thanks.

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.

None yet

3 participants