microsoft / microsoft/TypeScript
[SALSA] @callback's @param tags should not require names
Open
@sandersn is already working on this.
Since May 19, 2018.
Awaiting More Feedback
Domain: JavaScript
Suggestion
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
TypeScript Version: 2.9.0-dev.20180518
Search Terms:
@callback @params duplicate identifier error
Code
/**
* @callback ModuleSortPredicate
* @param {Module} a
* @param {Module} b
* @returns {-1|0|1}
*/
/**
* @callback ModuleFilterPredicate
* @param {Module}
* @param {Chunk}
* @returns {boolean}
*/
/**
* @callback ChunkFilterPredicate
* @param {Chunk} c
* @returns {boolean}
*/
Expected behavior:
No errors, or syntax highlighting errors.
Actual behavior:
lib/Chunk.js:44:18 - error TS1003: Identifier expected.
44 * @param {Chunk}
lib/Chunk.js:44:18 - error TS2300: Duplicate identifier '(Missing)'.
44 * @param {Chunk}
Playground Link:
Related Issues:
Here is an image of it in action. I'm not sure if it is interaction with other things at the same time. I'm happy to pull information for you @sandersn. If you goto webpack/webpack#feature/type-compiler-compilation-save branch you can go to those lines of the code and test it as well.

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.