@quenty/attributeutils 14.20.1 → 14.20.2-canary.607f741.0
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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [14.20.2-canary.607f741.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/attributeutils@14.20.1...@quenty/attributeutils@14.20.2-canary.607f741.0) (2025-12-28)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Typecheck some more things ([41eaaa6](https://github.com/Quenty/NevermoreEngine/commit/41eaaa6d053c469f7548810da72d05dfbf997b26))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [14.20.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/attributeutils@14.20.0...@quenty/attributeutils@14.20.1) (2025-11-22)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @quenty/attributeutils
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/attributeutils",
|
|
3
|
-
"version": "14.20.
|
|
3
|
+
"version": "14.20.2-canary.607f741.0",
|
|
4
4
|
"description": "Provides utility functions to work with attributes in Roblox",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -25,17 +25,17 @@
|
|
|
25
25
|
"Quenty"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@quenty/brio": "
|
|
29
|
-
"@quenty/canceltoken": "
|
|
30
|
-
"@quenty/loader": "
|
|
31
|
-
"@quenty/maid": "
|
|
32
|
-
"@quenty/promise": "
|
|
33
|
-
"@quenty/rx": "
|
|
34
|
-
"@quenty/rxsignal": "
|
|
35
|
-
"@quenty/symbol": "
|
|
28
|
+
"@quenty/brio": "14.20.1",
|
|
29
|
+
"@quenty/canceltoken": "11.13.0",
|
|
30
|
+
"@quenty/loader": "10.9.0",
|
|
31
|
+
"@quenty/maid": "3.5.0",
|
|
32
|
+
"@quenty/promise": "10.12.0",
|
|
33
|
+
"@quenty/rx": "13.20.0",
|
|
34
|
+
"@quenty/rxsignal": "7.20.0",
|
|
35
|
+
"@quenty/symbol": "3.5.0"
|
|
36
36
|
},
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "607f7418f46b85cd5843f1c5665911eb2dd7e3fb"
|
|
41
41
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
--!nonstrict
|
|
1
2
|
--[=[
|
|
2
3
|
Allows access to an attribute like a ValueObject.
|
|
3
4
|
|
|
@@ -62,7 +63,7 @@ function AttributeValue.new<T>(object: Instance, attributeName: string, defaultV
|
|
|
62
63
|
}
|
|
63
64
|
|
|
64
65
|
if defaultValue ~= nil and self._object:GetAttribute(self._attributeName) == nil then
|
|
65
|
-
self._object:SetAttribute(rawget(self, "_attributeName"), defaultValue)
|
|
66
|
+
self._object:SetAttribute(rawget(self, "_attributeName") :: string, defaultValue)
|
|
66
67
|
end
|
|
67
68
|
|
|
68
69
|
return setmetatable(self, AttributeValue) :: any
|
|
@@ -106,7 +107,7 @@ function AttributeValue.__index<T>(self: AttributeValue<T>, index)
|
|
|
106
107
|
if AttributeValue[index] then
|
|
107
108
|
return AttributeValue[index]
|
|
108
109
|
elseif index == "Value" then
|
|
109
|
-
local result = self._object:GetAttribute(rawget(self :: any, "_attributeName"))
|
|
110
|
+
local result = self._object:GetAttribute(rawget(self :: any, "_attributeName") :: string)
|
|
110
111
|
local default = rawget(self :: any, "_defaultValue")
|
|
111
112
|
if result == nil then
|
|
112
113
|
return default
|
|
@@ -124,7 +125,7 @@ end
|
|
|
124
125
|
|
|
125
126
|
function AttributeValue.__newindex<T>(self: AttributeValue<T>, index, value)
|
|
126
127
|
if index == "Value" then
|
|
127
|
-
self._object:SetAttribute(rawget(self :: any, "_attributeName"), value)
|
|
128
|
+
self._object:SetAttribute(rawget(self :: any, "_attributeName") :: string, value)
|
|
128
129
|
elseif index == "AttributeName" then
|
|
129
130
|
error("Cannot set AttributeName")
|
|
130
131
|
else
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
--!nonstrict
|
|
1
2
|
--[=[
|
|
2
3
|
Allows access to an attribute like a ValueObject, but also encoded or decoded
|
|
3
4
|
|
|
@@ -50,7 +51,7 @@ end
|
|
|
50
51
|
@param condition function | nil
|
|
51
52
|
@return Observable<Brio<any>>
|
|
52
53
|
]=]
|
|
53
|
-
function EncodedAttributeValue:ObserveBrio(condition)
|
|
54
|
+
function EncodedAttributeValue:ObserveBrio(condition: Rx.Predicate<any>?)
|
|
54
55
|
return RxAttributeUtils.observeAttributeBrio(self._object, self._attributeName, condition):Pipe({
|
|
55
56
|
RxBrioUtils.map(rawget(self, "_decode")),
|
|
56
57
|
})
|