Skip to content

TypeError: b is undefined in __extends #4341

@drake7707

Description

@drake7707

class B extends A {
    constructor(msg:string) { 
        super(msg);
    }
}

class A {
    constructor(public msg:string) {

    }
}

If the super class of B is defined after A you'll get a runtime error.

Just tested the above code in the typescript playground and I get the same error

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptDuplicateAn existing issue was already created

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions