Skip to content

the type of super() should be instance, not void #37847

@LongTengDao

Description

@LongTengDao

TypeScript Version: 3.8.3

Search Terms:

Code

class Sub extends Super {
  constructor () { return super(); }
}

Expected behavior: no error

Actual behavior: TS2322

Playground Link:

Related Issues:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Has ReproThis issue has compiler-backed repros: https://aka.ms/ts-reprosNeeds InvestigationThis issue needs a team member to investigate its status.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions