Skip to content

Conversation

@aabajyan
Copy link
Contributor

I had this issue, where I was trying to use customName annotation to rename methods and I noticed that it was also including a new line and the first word of the next line. For example:

/** @noSelf */
declare namespace TestNamespace {
    /**
     * @customName pass
     * The first word should not be included.
     **/
    function fail(): void;
}

TestNamespace.fail();

Would result in:

TestNamespace["pass\nThe"]()

The solution was pretty simple, I only had to get the first line before splitting it by space.
I ran the tests and everything passes. Let me know if there's other changes I need to make.

@Zamiell
Copy link
Contributor

Zamiell commented Jul 16, 2025

nice work!

@Perryvw Perryvw merged commit 102a00a into TypeScriptToLua:master Jul 17, 2025
5 checks passed
@aabajyan aabajyan deleted the fix-tag-first-line branch July 29, 2025 18:46
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