Skip to content

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

Open

Description

/** @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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    P3featFeature Request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions