Skip to content

Support computed properties in class property declarations #1841

Closed
@JsonFreeman

Description

@JsonFreeman

We can emit computed properties class properties, using the following scheme:

class C {
    ["hello"] = 0;
    static ["bye"] = 0;
}

emits as:

var C = (function() {
    var __t1 = "hello";
    function C() {
       this[__t1] = 0;
    }
    C["bye"] = 0;
    return C;
})();

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