Skip to content

Conversation

@JohnnyMorganz
Copy link
Owner

Update the shape before formatting return type

Closes #896

@github-actions
Copy link
Contributor

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)))

@JohnnyMorganz
Copy link
Owner Author

Not a very nice diff. Need to solve that

@JohnnyMorganz JohnnyMorganz marked this pull request as draft November 17, 2024 16: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.

Long function with multiple generic return types formats inconsistently

2 participants