google / google/closure-compiler

JSDoc support for array destructuring

Open
#1,970 17 comments 22 reactions 0 assignees View on GitHub
enhancement ES6
Dominant language
JavaScript
Stars
7.7k
Forks
1.2k
Avg merge
2d 12h
Merged PRs (30d)
6

Description

Currently there is no simple way to annotate destructured array parameters.

I propose a syntax similar to the current destructured objects syntax:

``` javascript
/**
* @param {[x: number, y: number]} randomName
* @return number
*/
function add([x, y]) {
return x + y;
}
```

Due to the nature of destructured arrays, this issue is closely related to [#379](https://github.com/google/closure-compiler/issues/379).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.