Skip to content

Require either async override or override async (don't allow both)Β #43606

Closed
@Skalman

Description

@Skalman

Bug Report

πŸ”Ž Search Terms

class async override

πŸ•— Version & Regression Information

  • This changed between versions 4.2.0 and nightly

⏯ Playground Link

Playground link with relevant code

πŸ’» Code

class Base {
    method1() {}
    method2() {}
}

class Test extends Base {
    public override async method1() {
        return Promise.resolve(1);
    }

    public async override method2() {
        return Promise.resolve(1);
    }
}

πŸ™ Actual behavior

No errors

πŸ™‚ Expected behavior

Possibly error on either override async or async override.

My understanding (from #43533) is that you prefer requiring a specific modifier order. If that's the case, I would have expected an error here.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFix AvailableA PR has been opened for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions