@rbxts/types 1.0.740 → 1.0.742
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.
|
@@ -887,7 +887,7 @@ interface Instance {
|
|
|
887
887
|
/**
|
|
888
888
|
* Returns the Actor associated with the Instance, usually the first Actor ancestor
|
|
889
889
|
*/
|
|
890
|
-
GetActor(this: Instance): Actor;
|
|
890
|
+
GetActor(this: Instance): Actor | undefined;
|
|
891
891
|
/**
|
|
892
892
|
* This function returns the attribute which has been assigned to the given name. If no attribute has been assigned then nil is returned.
|
|
893
893
|
*
|
package/include/roblox.d.ts
CHANGED
|
@@ -1974,6 +1974,14 @@ interface Random {
|
|
|
1974
1974
|
* Returns a pseudorandom number uniformly distributed over [min, max).
|
|
1975
1975
|
*/
|
|
1976
1976
|
NextNumber(this: Random, min: number, max: number): number;
|
|
1977
|
+
/**
|
|
1978
|
+
* Uniformly shuffles the array part of `tb` in-place using `NextInteger` to pick indices. If there are any `nil` "holes" in the array part of the table, `Shuffle` throws an error, since shuffling could change the length.
|
|
1979
|
+
*
|
|
1980
|
+
* The hash part of `tb` is ignored. No metamethods are of `tb` are invoked.
|
|
1981
|
+
*
|
|
1982
|
+
* The shuffle is defined to be a Fisher-Yates shuffle so the number of `NextInteger` calls is guaranteed to be consistent between engine versions for a given size of table.
|
|
1983
|
+
*/
|
|
1984
|
+
Shuffle(this: Random, tb: Array<unknown>): void;
|
|
1977
1985
|
/**
|
|
1978
1986
|
* Returns a unit vector with a pseudorandom direction.
|
|
1979
1987
|
*
|