@rbxts/types 1.0.792 → 1.0.793
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/roblox.d.ts +10 -0
- package/package.json +1 -1
package/include/roblox.d.ts
CHANGED
|
@@ -810,6 +810,16 @@ interface InstanceConstructor {
|
|
|
810
810
|
* You can read [this thread on the developer forum](https://devforum.roblox.com/t/psa-dont-use-instance-new-with-parent-argument/30296) for more information.
|
|
811
811
|
*/
|
|
812
812
|
new <T extends keyof CreatableInstances>(className: T, parent?: Instance): CreatableInstances[T];
|
|
813
|
+
/**
|
|
814
|
+
* Creates a new object with the same type and property values as an existing object. In most cases using `Instance:Clone()` is more appropriate, but this constructor is useful when implementing low‑level libraries or systems.
|
|
815
|
+
*
|
|
816
|
+
* There are two behavioral differences between this constructor and the `Instance:Clone()` method:
|
|
817
|
+
* - This constructor will not copy any of the descendant `Instances` parented to the existing object.
|
|
818
|
+
* - This constructor will return a new object even if the existing object had `Instance.Archivable` set to `false`.
|
|
819
|
+
*/
|
|
820
|
+
fromExisting: <T extends keyof CreatableInstances>(
|
|
821
|
+
existingInstance: CreatableInstances[T],
|
|
822
|
+
) => CreatableInstances[T];
|
|
813
823
|
}
|
|
814
824
|
|
|
815
825
|
declare const Instance: InstanceConstructor;
|