closure-compiler icon indicating copy to clipboard operation
closure-compiler copied to clipboard

Support for type annotating arrays using `string[]` syntax rather than `Array<string>`

Open jespertheend opened this issue 2 years ago • 0 comments

/** @type {string[]} */
//               ^
// JSC_TYPE_PARSE_ERROR: Bad type annotation. expected closing }
const x = ["hi"];

This is supported in both TypeScript and JSDoc. It would be nice if closure supported this as well.

Appspot demo

jespertheend avatar Oct 28 '21 13:10 jespertheend