Setup custom name support#1505
Conversation
|
I'll have to add tests to this before it gets merged :) |
This reverts commit 2a8e998.
…ua into customName-extension
|
Noticed the reason for the lock files being in the repo, lol |
|
Perhaps further tests should be added, but please take a look at this one first and tell me what you think, aka if it is good or not. If it is, then I'll have a look at adding some more perhaps. |
Perryvw
left a comment
There was a problem hiding this comment.
Would also expect tests for renaming classes, variable declarations, namespaces, and also some declared functions that don't exist (ie declare function bla). The tests should execute the generated lua to show that all occurrences have indeed correctly been renamed.
|
There seems to be an issue with renaming the inner names of namespaces. (Hence the error from tests atm) Code for reprod: /** @customName Test2 **/
namespace Test {
/** @customName Func2 **/
export function Func(): string {
return "hi";
}
}
export const result = Test.Func();Seems like the |
|
This code is probably hidden somewhere in the callexpression transformer. I have considered unifying that more with the transformIdentifier code but haven't looked at it into much detail. |
|
I'll see if I can find where it is being transformed sometime later today :) |
|
Tests look fine, I'm still missing one where you put the customName on a |
I added a test for that as well now :) Could you please have a look at |
|
🎉 |
Co-authored-by: Perry van Wesel <Perryvw@users.noreply.github.com>

This PR aims to provide a way of renaming the built name of functions, or such.
Resolves issue: #1498
Example usage
Lua output from the example