Skip to content

validating arguments passed to lua lib functions#484

Merged
tomblind merged 4 commits intomasterfrom
validate-lualib-args
Mar 18, 2019
Merged

validating arguments passed to lua lib functions#484
tomblind merged 4 commits intomasterfrom
validate-lualib-args

Conversation

@tomblind
Copy link
Copy Markdown
Collaborator

fixes #481

}

public transformStringCallExpression(node: ts.CallExpression): tstl.Expression {
public transformStringCallExpression(node: ts.CallExpression, signature: ts.Signature): tstl.Expression {
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.

Thinking about the API we want to make available for people to override the transformers, I have my doubts if adding this signature parameter is a good idea. We have a couple options here: Can we just get the signature from the node inside this function? Is this a function that should not be in the public interface? Or do we just keep it like this.

My main point being it is not really clear what this signature is or where you should get it from? Is it not just part of the call expression?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

That's a good point. I'm pretty sure we can grab it inside the function - I was only passing it in since we already had it.

@tomblind tomblind merged commit 02b9642 into master Mar 18, 2019
@tomblind tomblind deleted the validate-lualib-args branch March 18, 2019 14:11
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.

Function conversion check doesn't work on lualib functions

2 participants