Content-Length: 264000 | pFad | http://github.com/typescript-eslint/typescript-eslint/issues/9222

B6 AST tightening: `PrivateIdentifier` can only be LHS of `BinaryExpression[operator='in']` · Issue #9222 · typescript-eslint/typescript-eslint · GitHub
Skip to content

AST tightening: PrivateIdentifier can only be LHS of BinaryExpression[operator='in'] #9222

@Josh-Cena

Description

@Josh-Cena

Suggestion

We are planning to enforce the following invariants in our AST for BinaryExpression:

  • left can only be a PrivateIdentifier if operator: "in", so the following is a parsing error:
    #a + 1;

@sosukesuzuki @fisker Do these look safe to you?

Metadata

Metadata

Assignees

No one assigned

    Labels

    ASTPRs and Issues about the AST structureenhancementNew feature or requestpackage: 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









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: http://github.com/typescript-eslint/typescript-eslint/issues/9222

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy