Skip to content

add export to super call class identifier - #359

Merged
Perryvw merged 1 commit into
TypeScriptToLua:ts-to-lua-astfrom
TheLartians:fix-exported-super-constructor
Jan 26, 2019
Merged

add export to super call class identifier#359
Perryvw merged 1 commit into
TypeScriptToLua:ts-to-lua-astfrom
TheLartians:fix-exported-super-constructor

Conversation

@TheLartians

@TheLartians TheLartians commented Jan 26, 2019

Copy link
Copy Markdown
Contributor

Allows calling constructors on exported base classes. As tests with export are currently unsupported, here is some theoretical test code.

export class Base{
  value: number;
  constructor(){ this.value = 7; }
}

export class Derived extends Base{
  constructor(){ super(); }
}

const a = new Derived();
Expect(a.value).toBe(7)

@Perryvw
Perryvw merged commit 58cd74d into TypeScriptToLua:ts-to-lua-ast Jan 26, 2019
@TheLartians
TheLartians deleted the fix-exported-super-constructor branch February 17, 2019 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants