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

贡献者指南