Skip to content

Make $tuple be a const type - #530

Open
sasial-dev wants to merge 1 commit into
roblox-ts:masterfrom
sasial-dev:tuple-macro-const-type
Open

sasial-dev wants to merge 1 commit into
roblox-ts:masterfrom
sasial-dev:tuple-macro-const-type

Conversation

@sasial-dev

Copy link
Copy Markdown
Contributor

Allows you to return $tuple(true) instead of $tuple(true as const)

@rimuy

rimuy commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

For reference, this makes the macro infer its types as their literal form rather than their assignables. Currently $tuple(false, "error message") becomes LuaTuple<[boolean, string]> instead of LuaTuple<[false, "error message"]>, which errors on function signatures with tuple returns that contain type unions due to ambiguity.

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