Skip to content

Class properties should be initialized after constructor parameter properties #697

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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