Skip to content

Class decorators - #558

Merged
Perryvw merged 24 commits into
TypeScriptToLua:masterfrom
thatcosmonaut:class_decorators
May 5, 2019
Merged

Class decorators#558
Perryvw merged 24 commits into
TypeScriptToLua:masterfrom
thatcosmonaut:class_decorators

Conversation

@thatcosmonaut

Copy link
Copy Markdown
Contributor

No description provided.

@thatcosmonaut

Copy link
Copy Markdown
Contributor Author

Resolves #537

Comment thread src/LuaTransformer.ts Outdated
Comment thread src/LuaTransformer.ts Outdated
Comment thread src/LuaTransformer.ts Outdated
Comment thread test/unit/classDecorator.spec.ts

@ark120202 ark120202 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, it would be nice to have an error when decorators are used in not yet supported locations

Comment thread src/LuaTransformer.ts
Comment thread src/LuaTransformer.ts Outdated
Comment thread src/LuaTransformer.ts Outdated
Comment thread src/lualib/Decorate.ts Outdated
Comment thread test/unit/classDecorator.spec.ts
Comment thread test/unit/classDecorator.spec.ts Outdated

test("Class decorator with parameters", () => {
const source = `
function SetNum(this: void, numArg: number) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check if decorator factories work without this: void, they should work with and without it.

Comment thread src/LuaTransformer.ts Outdated
}
}

public createConstructorDecorationStatement(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be private.

@Perryvw
Perryvw merged commit c304078 into TypeScriptToLua:master May 5, 2019
@thatcosmonaut
thatcosmonaut deleted the class_decorators branch May 5, 2019 13:55
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.

3 participants