Skip to content

Enhancement: Forbid abstract modifier in object methods #11655

@fisker

Description

@fisker

Before You File a Proposal Please Confirm You Have Done The Following...

Relevant Package

ast-spec

My proposal is suitable for this project

  • I believe my proposal would be useful to the broader TypeScript community (meaning it is not a niche proposal).

Description

({
  abstract method() {
    return 1;
  }
})

Playground

TypeScript
1042: 'abstract' modifier cannot be used here. 2:3 - 2:11
1244: Abstract methods can only appear within an abstract class. 2:3 - 2:11

Additional Info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issueenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions