Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions types/Array.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,11 @@ interface Array<T> extends ReadonlyArray<T> {
* (`!comp(list[i+1], list[i])` will be true after the sort). Alias to Lua's `table.sort`.
* @param compareFunction A function that defines the sort order. Returns true when the first element must come
* before the second. If omitted, the array is sorted according to the `<` operator.
* @example
* // Vanilla TS:
* arr.sort((a, b) => a - b); //ascending order
* // Roblox Ts:
* arr.sort((a, b) => a < b); //ascending order
*/
sort(this: Array<defined>, compareFunction?: (a: T, b: T) => boolean): Array<T>;

Expand Down
Loading