Skip to content

Constructor assignment breaks keyword properties #789

@TheLartians

Description

@TheLartians

As can be seen in the playground, the property name error gets renamed to ____error.

Input

class A {
    constructor(public error: string){}
}

const a = new A("42");
console.log(a.error);

Current output

nil

Expected output

42

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions