google / google/closure-compiler

Invalid param name

Open
#773 4 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
7.7k
Forks
1.2k
Avg merge
2d 12h
Merged PRs (30d)
6

Description

``` js
/**
* @param {!Object} params - parameters
* @param {number} params.foo - some value
*/
function compile (params) {}
```

```
JSC_INVALID_PARAM: Parse error. invalid param name "params.foo" at line 3 character 19
* @param {number} params.foo - some value
```

Earlier this syntax worked. This syntax is more convenient than

``` js
/**
* @param {{foo: number}} params - parameters
*/
function compile (params) {}
```

Because it allows to add a description of the parameters.

https://github.com/google/closure-compiler/issues/392

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.