You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this case, it's done because Luau doesn't support typing indices of an array, so we use a union and document the indices with comments.
In other cases, it may be done to document something else about each type in the union. For example, instead of type aliasing Key = string, I might do string -- Key followed by another type on the next line, | { string } -- Tags
The text was updated successfully, but these errors were encountered:
Corecii
changed the title
Incorrect removel of newlines when comments, newlines, and Luau | type union is combined
Incorrect removal of newlines when comments, newlines, and Luau | type union is combined
Oct 31, 2022
The following code is incorrectly combined into one line:
becomes
Use cases for this type of commenting:
Key = string
, I might dostring -- Key
followed by another type on the next line,| { string } -- Tags
The text was updated successfully, but these errors were encountered: