Microsoft/TypeScript

JSDoc support for destructured parameters

開放

#11,859 建立於 2016年10月26日

 (12 則留言) (44 個反應) (0 位負責人)TypeScript (13,395 個分叉)batch import
Domain: JSDocHelp WantedIn DiscussionSuggestionVS Code Tracked

倉庫指標

星標
 (108,860 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

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

貢獻者指南