Skip to content

Class properties should be initialized after constructor parameter properties #697

@ark120202

Description

@ark120202

Input:

class Test {
  public foo = this.bar;
  constructor(public bar: string) {}
}

Current Result:

-- ...
function Test.prototype.____constructor(self, bar)
    self.foo = self.bar
    self.bar = bar
end

Expected Result:

-- ...
function Test.prototype.____constructor(self, bar)
    self.bar = bar
    self.foo = self.bar
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions