Skip to content

Cannot extend native Error class #7639

Closed
@iby

Description

@iby
class FooError extends Error {
    constructor(message:string) {
        super(message);
    }
}
console.log((new FooError('foo')).message); // <nothing>
console.log((new Error('bar')).message); // bar

Am I missing something obvious or is there a bug with 1.8.9?

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions