Skip to content

JsDoc inline function signature does not honor optional params #6811

@billti

Description

@billti

The below two should be equivalent, however the optionality is lost of the second param on f6.

/** @type {function(string, boolean=): number} */
var f6;

/**
 * @param {string} p1
 * @param {boolean=} p2
 * @return {number}
 */
function f7(p1,p2){}

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions