Closed
Description
/**
* @param [a] - you don't have to provide a
*/
function f(a) {
}
Expected signature: f(a?: any): void
Actual signature: f(a: any): void
Note that if we want to retain the UntypedSignatureInJSFile rules, this feature is not needed. However, omitting any untyped argument in JS doesn't make sense for today's uses of JS, and whatever support we have in Corsa should be removed.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
sandersn commentedon May 16, 2025
Never mind, I misread the code. When I tested it, optionality applies any time the parameter's type is nil, not the tag's. Which is always the case in correct JS code; and in incorrect code where somebody has put in a type annotation by mistake, I'd expect the semantics to follow TS, plus an error.