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

Remove properties that are used by invalid code #4759

Closed
Labels
ASTPRs and Issues about the AST structureaccepting prsGo ahead, send a pull request that resolves this issuebreaking changeThis change will require a new major version to be releasedpackage: typescript-estreeIssues related to @typescript-eslint/typescript-estree
Milestone
@bradzacher

Description

@bradzacher

Currently we have the following AST properties declared:

These all represent bad code that would cause errors if one attempted to build in TS:

public enum Foo {}// 'public' modifier cannot appear on a module or namespace element.(1044)abstract namespace Bar {}// 'abstract' modifier can only appear on a class, method, or property declaration.(1242)interface Baz implements Bam {}// Interface declaration cannot have 'implements' clause.(1176)abstract interface Bam {}// 'abstract' modifier can only appear on a class, method, or property declaration.

TS parses these fine and emits a semantic error, not a syntactic error.
Our parser currently does not error on syntactically bad code, thus we also don't error on it (#1852).

We should remove these properties from the AST as it is non-sensical to include them - nobody should ever be inspecting the code that is produced on them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ASTPRs and Issues about the AST structureaccepting prsGo ahead, send a pull request that resolves this issuebreaking changeThis change will require a new major version to be releasedpackage: typescript-estreeIssues related to @typescript-eslint/typescript-estree

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp