@rbxts/types 1.0.584 → 1.0.587

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.
Files changed (2) hide show
  1. package/include/lua.d.ts +11 -1
  2. package/package.json +1 -1
package/include/lua.d.ts CHANGED
@@ -551,7 +551,7 @@ declare namespace math {
551
551
  function round(n: number): number;
552
552
 
553
553
  /** Returns -1 if `x < 0`, 0 if `x == 0`, or 1 if `x > 0`. */
554
- function sign(n: number): number;
554
+ function sign(n: number): -1 | 0 | 1;
555
555
 
556
556
  /** Returns the sine of x (assumed to be in radians). */
557
557
  function sin(n: number): number;
@@ -697,6 +697,16 @@ declare namespace table {
697
697
  function freeze(t: object): void;
698
698
  /** Returns whether or not `t` is frozen */
699
699
  function isfrozen<T extends object>(t: T): t is Readonly<T>;
700
+
701
+ /**
702
+ * Takes an object and returns a new object that has the same keys, values and metatable.
703
+ *
704
+ * The cloning is shallow - meaning that any object values in the clone will reference the same value objects as the parent.
705
+ */
706
+ function clone<V>(value: ReadonlyArray<V>): Array<V>;
707
+ function clone<V>(value: ReadonlySet<V>): Set<V>;
708
+ function clone<K, V>(value: ReadonlyMap<K, V>): Map<K, V>;
709
+ function clone<T extends object>(value: T): T;
700
710
  }
701
711
 
702
712
  type thread = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rbxts/types",
3
- "version": "1.0.584",
3
+ "version": "1.0.587",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },