microsoft/TypeScript

Show default values in jsdoc quick-info.

mjbvz opened this issue · 2 comments

mjbvz commented

From @Wolfonye on September 28, 2018 11:9

I hope I didn't overlook any issue that poses the same request in a different wording; if yes I am sorry.

The request:
I repeatedly encounter situations where I would be glad to see the default values
for optional parameters (if specified) in the ctrl+shift+space quick-info.

Is there anything speaking against such a feature?

Copied from original issue: microsoft/vscode#59609

mjbvz commented

Example jsdoc with default param:

/**
 * @param {string} [somebody=John Doe] - Somebody's name.
 */
function sayHello(somebody) {
    if (!somebody) {
        somebody = 'John Doe';
    }
    alert('Hello ' + somebody);
}

Duplicate #16665