The formatter removes parenthesis around pack parameters that contain only one type, which can cause an error with linters: Type parameters must come before type pack parameters
For example, if you set up the following code:
type SomeType<T..., U...> = (T...) -> U... local fn: SomeType<(string, number), (boolean)>
StyLua will format it to this:
type SomeType<T..., U...> = (T...) -> U... local fn: SomeType<(string, number), boolean>
Without the parenthesis around pack parameters, the type of fn
will incorrectly resolve to (string, number) -> ()
in this case with Luau LSP.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4