diff --git a/types/Array.d.ts b/types/Array.d.ts index a575d4c..02f27cc 100644 --- a/types/Array.d.ts +++ b/types/Array.d.ts @@ -244,6 +244,11 @@ interface Array extends ReadonlyArray { * (`!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, compareFunction?: (a: T, b: T) => boolean): Array;