Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Support for JSDoc type assertions #1682

Open
Labels
ASTPRs and Issues about the AST structureaccepting prsGo ahead, send a pull request that resolves this issuepackage: typescript-estreeIssues related to @typescript-eslint/typescript-estree
@thorn0

Description

@thorn0

What code were you trying to parse?

/**@type {Date} */(expr)

What did you expect to happen?

There are cases when AST consumers need to know whether an expression had parens. Babel adds.extra.parenthesized: true to nodes. My proposal is to do the same thing. For example, this feature would be useful for Prettier to formatClosure-style type casts properly.

What actually happened?

The parser ignores parens when building the AST.

Versions

not relevant

Metadata

Metadata

Assignees

No one assigned

    Labels

    ASTPRs and Issues about the AST structureaccepting prsGo ahead, send a pull request that resolves this issuepackage: typescript-estreeIssues related to @typescript-eslint/typescript-estree

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp