Microsoft/TypeScript

JSDoc support for destructured parameters

Open

#11 859 ouverte le 26 oct. 2016

Voir sur GitHub
 (12 commentaires) (44 réactions) (0 assignés)TypeScript (6 726 forks)batch import
Domain: JSDocHelp WantedIn DiscussionSuggestionVS Code Tracked

Métriques du dépôt

Stars
 (48 455 stars)
Métriques de merge PR
 (Merge moyen 6j 17h) (9 PRs mergées en 30 j)

Description

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

Guide contributeur