StyLua
StyLua copied to clipboard
Take into account size of function definition when formatting return type
Update the shape before formatting return type
Closes #896
Repo Comparison Test
diff --git ORI/CorePackages/modules/Collections/src/Array/map.lua ALT/CorePackages/modules/Collections/src/Array/map.lua
index 01b1443..88535aa 100644
--- ORI/CorePackages/modules/Collections/src/Array/map.lua
+++ ALT/CorePackages/modules/Collections/src/Array/map.lua
@@ -24,7 +24,9 @@ type callbackFnWithThisArg<T, U, V> = (thisArg: V, element: T, index: number, ar
-- Implements Javascript's `Array.prototype.map` as defined below
-- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map
-return function<T, U, V>(t: Array<T>, callback: callbackFn<T, U> | callbackFnWithThisArg<T, U, V>, thisArg: V?): Array<U>
+return function<T, U, V>(t: Array<T>, callback: callbackFn<T, U> | callbackFnWithThisArg<T, U, V>, thisArg: V?): Array<
+ U
+>
if _G.__DEV__ then
if typeof(t) ~= "table" then
error(string.format("Array.map called on %s", typeof(t)))
Not a very nice diff. Need to solve that