@rbxts/types 1.0.612 → 1.0.613

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.
@@ -762,7 +762,7 @@ interface Instance {
762
762
  * * [Instance.AttributeChanged](https://developer.roblox.com/en-us/api-reference/event/Instance/AttributeChanged), fires whenever an attribute is changed on the instance
763
763
  * * [Instance:GetAttributeChangedSignal](https://developer.roblox.com/en-us/api-reference/function/Instance/GetAttributeChangedSignal), returns an event that fires when the given attribute changes
764
764
  */
765
- GetAttribute(this: Instance, attribute: string): unknown;
765
+ GetAttribute(this: Instance, attribute: string): AttributeValue | undefined;
766
766
  /**
767
767
  * This function returns an event that behaves exactly like the `Changed` event, except that the event only fires when the given attribute changes. It's generally a good idea to use this method instead of a connection to Changed with a function that checks the attribute name. Subsequent calls to this method on the same object with the same attribute name return the same event.
768
768
  *
@@ -803,7 +803,7 @@ interface Instance {
803
803
  * * [Instance.AttributeChanged](https://developer.roblox.com/en-us/api-reference/event/Instance/AttributeChanged), fires whenever an attribute is changed on the instance
804
804
  * * [Instance:GetAttributeChangedSignal](https://developer.roblox.com/en-us/api-reference/function/Instance/GetAttributeChangedSignal), returns an event that fires when the given attribute changes
805
805
  */
806
- GetAttributes(this: Instance): object;
806
+ GetAttributes(this: Instance): Map<string, AttributeValue>;
807
807
  /**
808
808
  * Returns an array (a numerically indexed table) containing all of the [Instance](https://developer.roblox.com/en-us/api-reference/class/Instance)'s direct children, or every [Instance](https://developer.roblox.com/en-us/api-reference/class/Instance) whose [Parent](https://developer.roblox.com/en-us/api-reference/property/Instance/Parent) is equal to the object. The array can be iterated upon using either a numeric or generic for-loop:
809
809
  *
@@ -935,7 +935,7 @@ interface Instance {
935
935
  * * [Instance.AttributeChanged](https://developer.roblox.com/en-us/api-reference/event/Instance/AttributeChanged), fires whenever an attribute is changed on the instance
936
936
  * * [Instance:GetAttributeChangedSignal](https://developer.roblox.com/en-us/api-reference/function/Instance/GetAttributeChangedSignal), returns an event that fires when the given attribute changes
937
937
  */
938
- SetAttribute(this: Instance, attribute: string, value: unknown): void;
938
+ SetAttribute(this: Instance, attribute: string, value: AttributeValue | undefined): void;
939
939
  /**
940
940
  * Returns the child of the [Instance](https://developer.roblox.com/en-us/api-reference/class/Instance) with the given name. If the child does not exist, it will yield the current thread until it does.
941
941
  *
@@ -2344,3 +2344,18 @@ interface CheckableTypes extends CheckablePrimitives {
2344
2344
  Vector3: Vector3;
2345
2345
  Vector3int16: Vector3int16;
2346
2346
  }
2347
+
2348
+ type AttributeValue =
2349
+ | string
2350
+ | boolean
2351
+ | number
2352
+ | UDim
2353
+ | UDim2
2354
+ | BrickColor
2355
+ | Color3
2356
+ | Vector2
2357
+ | Vector3
2358
+ | NumberSequence
2359
+ | ColorSequence
2360
+ | NumberRange
2361
+ | Rect;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rbxts/types",
3
- "version": "1.0.612",
3
+ "version": "1.0.613",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },