Skip to content

Suggestion: pure abstract classes shouldn't require 'super' call #4429

Closed
@sophiajt

Description

@sophiajt

In this example:

abstract class Fred { }

class Sam extends Fred {
    constructor() { }
}

We currently error on the constructor in Sam saying it's an error to not have a super() call. But arguably Fred is a purely abstract, has no state, no initialization, and no constructor. There doesn't seem to be a reason to enforce the super call in this example.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DeclinedThe issue was declined as something which matches the TypeScript visionSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions