@rbxts/types 1.0.546 → 1.0.547
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/include/lua.d.ts +15 -2
- package/package.json +1 -1
package/include/lua.d.ts
CHANGED
|
@@ -671,7 +671,20 @@ declare namespace bit32 {
|
|
|
671
671
|
}
|
|
672
672
|
|
|
673
673
|
declare namespace table {
|
|
674
|
-
/**
|
|
674
|
+
/**
|
|
675
|
+
* Sets the value for all keys within the given table to nil. This causes the # operator to return 0 for the given
|
|
676
|
+
* table. The allocated capacity of the table’s array portion is maintained, which allows for efficient re-use of
|
|
677
|
+
* the space.
|
|
678
|
+
*
|
|
679
|
+
* This function does not delete/destroy the table provided to it. This function is meant to be used specifically
|
|
680
|
+
* for tables that are to be re-used.
|
|
681
|
+
*/
|
|
682
|
+
function clear(t: object): void;
|
|
683
|
+
/**
|
|
684
|
+
* Sorts list elements in a given order, in-place, from `list[1]` to `list[#list]`. Comp is a function that
|
|
685
|
+
* receives two list elements and returns true when the first element must come before the second in the final order
|
|
686
|
+
* (so that `not comp(list[i+1],list[i])` will be true after the sort).
|
|
687
|
+
*/
|
|
675
688
|
function sort<T>(t: Array<T>, comp?: (a: T, b: T) => boolean): void;
|
|
676
689
|
/** Makes the table read-only and prohibits all further modifications */
|
|
677
690
|
function freeze(t: object): void;
|
|
@@ -759,7 +772,7 @@ declare function pairs<K, V>(
|
|
|
759
772
|
): IterableFunction<LuaTuple<[Exclude<K, undefined>, Exclude<V, undefined>]>>;
|
|
760
773
|
declare function pairs<T extends object>(
|
|
761
774
|
object: T,
|
|
762
|
-
):
|
|
775
|
+
): keyof T extends never
|
|
763
776
|
? IterableFunction<LuaTuple<[unknown, defined]>>
|
|
764
777
|
: IterableFunction<LuaTuple<[keyof T, Exclude<T[keyof T], undefined>]>>;
|
|
765
778
|
|