Skip to content

[SALSA] @callback's @param tags should not require names #24264

@TheLarkInn

Description

@TheLarkInn

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.

image

Metadata

Metadata

Assignees

Labels

Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureDomain: JavaScriptThe issue relates to JavaScript specificallySuggestionAn idea for TypeScript

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions