Microsoft/TypeScript

JSDoc support for destructured parameters

オープン

#11,859 opened on 2016/10/26

 (12 件のコメント) (44 件のリアクション) (0 人の担当者)TypeScript (13,395 件のフォーク)batch import
Domain: JSDocHelp WantedIn DiscussionSuggestionVS Code Tracked

Repository metrics

Stars
 (108,860 個のスター)
PR merge metrics
 (PR metrics pending)

説明

TypeScript Version: 2.0.3

Code

interface Foo {
    /**
     * A bar value
     */
    bar?: string;
}

/**
 * A function
 *
 * @param foo A param
 * @param { bar } Another param
 * @param bar Another param
 */
function foo(foo: string, { bar }: Foo): void {
    bar;
    foo;
}

foo('bar', { bar: 'play' });

Expected behavior:

Intellisense for the second argument, or the second argument properties.

Actual behavior:

No way of providing a description for the destructured elements of a destructured parameter.

destructured

コントリビューターガイド