Skip to content

Allow keeping parenthesis for closure compiler type casting #1445

@stringham

Description

@stringham

When writing javascript for use with the Closure compiler, parenthesis directly following a type annotation comment have meaning.

Type cast precede a parenthesized expression.

var x = /** @type {string} */ (fruit);

prettier outputs:

var x /** @type {string} */ = fruit;

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:commentsIssues with how Prettier prints commentslocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions