@quenty/observablecollection 12.24.3 → 12.24.4
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 +11 -0
- package/package.json +8 -8
- package/src/Shared/ObservableCountingMap.lua +12 -12
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
|
+
## [12.24.4](https://github.com/Quenty/NevermoreEngine/compare/@quenty/observablecollection@12.24.3...@quenty/observablecollection@12.24.4) (2025-12-29)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Update typing to be more accurate ([e4c3d05](https://github.com/Quenty/NevermoreEngine/commit/e4c3d05a0aa9f45a37cbfa372c5e0d8a748c9323))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [12.24.3](https://github.com/Quenty/NevermoreEngine/compare/@quenty/observablecollection@12.24.2...@quenty/observablecollection@12.24.3) (2025-12-28)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @quenty/observablecollection
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/observablecollection",
|
|
3
|
-
"version": "12.24.
|
|
3
|
+
"version": "12.24.4",
|
|
4
4
|
"description": "A set of observable collections, such as sets, maps, sorted lists, and more.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -28,23 +28,23 @@
|
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@quenty/baseobject": "^10.9.0",
|
|
31
|
-
"@quenty/brio": "^14.20.
|
|
31
|
+
"@quenty/brio": "^14.20.2",
|
|
32
32
|
"@quenty/ducktype": "^5.9.0",
|
|
33
33
|
"@quenty/loader": "^10.9.0",
|
|
34
34
|
"@quenty/maid": "^3.5.0",
|
|
35
|
-
"@quenty/promise": "^10.12.
|
|
36
|
-
"@quenty/rx": "^13.20.
|
|
37
|
-
"@quenty/signal": "^7.11.
|
|
35
|
+
"@quenty/promise": "^10.12.1",
|
|
36
|
+
"@quenty/rx": "^13.20.1",
|
|
37
|
+
"@quenty/signal": "^7.11.2",
|
|
38
38
|
"@quenty/steputils": "^3.6.0",
|
|
39
39
|
"@quenty/symbol": "^3.5.0",
|
|
40
40
|
"@quenty/table": "^3.8.0",
|
|
41
|
-
"@quenty/valueobject": "^13.21.
|
|
41
|
+
"@quenty/valueobject": "^13.21.4"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@quenty/blend": "^12.22.
|
|
44
|
+
"@quenty/blend": "^12.22.4"
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "e4614dfea3bf2580ec2b10552c311b273ed1387c"
|
|
50
50
|
}
|
|
@@ -50,7 +50,7 @@ export type ObservableCountingMap<T> = typeof(setmetatable(
|
|
|
50
50
|
@prop CountChanged Signal<number>
|
|
51
51
|
@within ObservableCountingMap
|
|
52
52
|
]=]
|
|
53
|
-
TotalKeyCountChanged: Signal.Signal<number>,
|
|
53
|
+
TotalKeyCountChanged: Signal.Signal<(number, number, ...any)>,
|
|
54
54
|
|
|
55
55
|
_maid: Maid.Maid,
|
|
56
56
|
_map: { [T]: number },
|
|
@@ -65,7 +65,7 @@ export type ObservableCountingMap<T> = typeof(setmetatable(
|
|
|
65
65
|
@return ObservableCountingMap<T>
|
|
66
66
|
]=]
|
|
67
67
|
function ObservableCountingMap.new<T>(): ObservableCountingMap<T>
|
|
68
|
-
local self:
|
|
68
|
+
local self: ObservableCountingMap<T> = setmetatable({} :: any, ObservableCountingMap)
|
|
69
69
|
|
|
70
70
|
self._maid = Maid.new()
|
|
71
71
|
self._map = {}
|
|
@@ -73,9 +73,9 @@ function ObservableCountingMap.new<T>(): ObservableCountingMap<T>
|
|
|
73
73
|
self._totalKeyCountValue = self._maid:Add(ValueObject.new(0, "number"))
|
|
74
74
|
self._keySubTable = self._maid:Add(ObservableSubscriptionTable.new())
|
|
75
75
|
|
|
76
|
-
self.KeyAdded = self._maid:Add(Signal.new())
|
|
77
|
-
self.KeyRemoved = self._maid:Add(Signal.new())
|
|
78
|
-
self.KeyChanged = self._maid:Add(Signal.new())
|
|
76
|
+
self.KeyAdded = self._maid:Add(Signal.new() :: any)
|
|
77
|
+
self.KeyRemoved = self._maid:Add(Signal.new() :: any)
|
|
78
|
+
self.KeyChanged = self._maid:Add(Signal.new() :: any)
|
|
79
79
|
self.TotalKeyCountChanged = self._totalKeyCountValue.Changed
|
|
80
80
|
|
|
81
81
|
return self
|
|
@@ -95,7 +95,7 @@ end
|
|
|
95
95
|
|
|
96
96
|
@return (T) -> ((T, nextIndex: any) -> ...any, T?)
|
|
97
97
|
]=]
|
|
98
|
-
function ObservableCountingMap.__iter<T>(self: ObservableCountingMap<T>)
|
|
98
|
+
function ObservableCountingMap.__iter<T>(self: ObservableCountingMap<T>): any
|
|
99
99
|
return pairs(self._map)
|
|
100
100
|
end
|
|
101
101
|
|
|
@@ -105,7 +105,7 @@ end
|
|
|
105
105
|
]=]
|
|
106
106
|
function ObservableCountingMap.ObserveKeysList<T>(self: ObservableCountingMap<T>): Observable.Observable<{ T }>
|
|
107
107
|
return self:_observeDerivedDataStructureFromKeys(function()
|
|
108
|
-
local list = table.create(self._totalKeyCountValue.Value)
|
|
108
|
+
local list: { T } = table.create(self._totalKeyCountValue.Value)
|
|
109
109
|
|
|
110
110
|
for key, _ in self._map do
|
|
111
111
|
table.insert(list, key)
|
|
@@ -121,7 +121,7 @@ end
|
|
|
121
121
|
]=]
|
|
122
122
|
function ObservableCountingMap.ObserveKeysSet<T>(self: ObservableCountingMap<T>): Observable.Observable<Set.Set<T>>
|
|
123
123
|
return self:_observeDerivedDataStructureFromKeys(function()
|
|
124
|
-
local set = {}
|
|
124
|
+
local set: Set.Set<T> = {}
|
|
125
125
|
|
|
126
126
|
for key, _ in self._map do
|
|
127
127
|
set[key] = true
|
|
@@ -131,10 +131,10 @@ function ObservableCountingMap.ObserveKeysSet<T>(self: ObservableCountingMap<T>)
|
|
|
131
131
|
end)
|
|
132
132
|
end
|
|
133
133
|
|
|
134
|
-
function ObservableCountingMap._observeDerivedDataStructureFromKeys<T>(
|
|
134
|
+
function ObservableCountingMap._observeDerivedDataStructureFromKeys<T, UDerived>(
|
|
135
135
|
self: ObservableCountingMap<T>,
|
|
136
|
-
gatherValues
|
|
137
|
-
): Observable.Observable<
|
|
136
|
+
gatherValues: () -> UDerived
|
|
137
|
+
): Observable.Observable<UDerived>
|
|
138
138
|
return Observable.new(function(sub)
|
|
139
139
|
local maid = Maid.new()
|
|
140
140
|
|
|
@@ -154,7 +154,7 @@ function ObservableCountingMap._observeDerivedDataStructureFromKeys<T>(
|
|
|
154
154
|
end)
|
|
155
155
|
|
|
156
156
|
return maid
|
|
157
|
-
end)
|
|
157
|
+
end) :: any
|
|
158
158
|
end
|
|
159
159
|
|
|
160
160
|
--[=[
|