Skip to content

Fix JSDoc for makeNewProfiledTapFn to conform to TypeScript types - #6988

Closed
mohsen1 wants to merge 1 commit into
webpack:masterfrom
mohsen1:fix-jsdoc
Closed

mohsen1 wants to merge 1 commit into
webpack:masterfrom
mohsen1:fix-jsdoc

Conversation

@mohsen1

@mohsen1 mohsen1 commented Apr 8, 2018

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?
Refactor

Did you add tests for your changes?
No

If relevant, link to documentation update:
N/A

Summary
This is part of #6862
The way JSDoc works with TypeScript is a bit different and we want to make sure that TypeScript can understand our JSDoc.
I'm asking the TypeScript team to make it easier to work with destructuring parameters. See microsoft/TypeScript#11597. Until that issue resolves, this is an intermediate solution.

Does this PR introduce a breaking change?
No, just comment changes

@webpack-bot

Copy link
Copy Markdown
Contributor

Thank you for your pull request! The most important CI builds succeeded, we’ll review the pull request soon.

@sokra

sokra commented Apr 9, 2018

Copy link
Copy Markdown
Member

This is weird, and probably makes the code less readable. This should be fixed on typescript side.

I would accept a name tag in the arguments list like this:

...
/** @param opts */ { name, type, fn }

But the jsdoc should still list all items.

@sokra sokra left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Blocked on typescript

@mohsen1

mohsen1 commented Apr 11, 2018

Copy link
Copy Markdown
Contributor Author

🎉
TypeScript fixed this issue so we don't have to do this awkward comments

95ca14b

@mohsen1 mohsen1 closed this Apr 11, 2018
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.

3 participants