@quenty/rxbinderutils 14.19.3 → 14.19.4-canary.11a5dcf.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,22 @@
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.19.4-canary.11a5dcf.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/rxbinderutils@14.19.3...@quenty/rxbinderutils@14.19.4-canary.11a5dcf.0) (2025-05-10)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * Additional type checking updates ([05ba29a](https://github.com/Quenty/NevermoreEngine/commit/05ba29a03efc9f3feed74b34f1d9dfb237496214))
12
+
13
+
14
+ ### Features
15
+
16
+ * Add even more types ([b31717d](https://github.com/Quenty/NevermoreEngine/commit/b31717d8c9f7620c457f5018a2affa760a65334a))
17
+
18
+
19
+
20
+
21
+
6
22
  ## [14.19.3](https://github.com/Quenty/NevermoreEngine/compare/@quenty/rxbinderutils@14.19.2...@quenty/rxbinderutils@14.19.3) (2025-04-10)
7
23
 
8
24
  **Note:** Version bump only for package @quenty/rxbinderutils
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/rxbinderutils",
3
- "version": "14.19.3",
3
+ "version": "14.19.4-canary.11a5dcf.0",
4
4
  "description": "Reactive extensions for binders",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -26,16 +26,16 @@
26
26
  "Quenty"
27
27
  ],
28
28
  "dependencies": {
29
- "@quenty/binder": "^14.19.3",
30
- "@quenty/brio": "^14.17.3",
31
- "@quenty/instanceutils": "^13.17.3",
32
- "@quenty/linkutils": "^13.17.3",
33
- "@quenty/loader": "^10.8.3",
34
- "@quenty/maid": "^3.4.3",
35
- "@quenty/rx": "^13.17.3"
29
+ "@quenty/binder": "14.19.4-canary.11a5dcf.0",
30
+ "@quenty/brio": "14.17.4-canary.11a5dcf.0",
31
+ "@quenty/instanceutils": "13.17.4-canary.11a5dcf.0",
32
+ "@quenty/linkutils": "13.17.4-canary.11a5dcf.0",
33
+ "@quenty/loader": "10.8.4-canary.11a5dcf.0",
34
+ "@quenty/maid": "3.4.4-canary.11a5dcf.0",
35
+ "@quenty/rx": "13.17.4-canary.11a5dcf.0"
36
36
  },
37
37
  "publishConfig": {
38
38
  "access": "public"
39
39
  },
40
- "gitHead": "b06c070ae91d5dab7bd8de6e290ad2caabb15d8f"
40
+ "gitHead": "11a5dcf7d4c7a0bfbf3337e97d30e8346ea09d3f"
41
41
  }
@@ -1,3 +1,4 @@
1
+ --!strict
1
2
  --[=[
2
3
  Rx utility methods involving [BinderGroup] API surface
3
4
  @class RxBinderGroupUtils
@@ -5,10 +6,11 @@
5
6
 
6
7
  local require = require(script.Parent.loader).load(script)
7
8
 
8
- local RxBinderUtils = require("RxBinderUtils")
9
- local Observable = require("Observable")
9
+ local BinderGroup = require("BinderGroup")
10
10
  local Maid = require("Maid")
11
+ local Observable = require("Observable")
11
12
  local Rx = require("Rx")
13
+ local RxBinderUtils = require("RxBinderUtils")
12
14
 
13
15
  local RxBinderGroupUtils = {}
14
16
 
@@ -17,7 +19,7 @@ local RxBinderGroupUtils = {}
17
19
  @param binderGroup BinderGroup<T>
18
20
  @return Observable<Binder<T>>
19
21
  ]=]
20
- function RxBinderGroupUtils.observeBinders(binderGroup)
22
+ function RxBinderGroupUtils.observeBinders(binderGroup: BinderGroup.BinderGroup)
21
23
  assert(type(binderGroup) == "table", "Bad binderGroup")
22
24
 
23
25
  return Observable.new(function(sub)
@@ -33,7 +35,6 @@ function RxBinderGroupUtils.observeBinders(binderGroup)
33
35
 
34
36
  return maid
35
37
  end)
36
-
37
38
  end
38
39
 
39
40
  --[=[
@@ -44,10 +45,9 @@ end
44
45
  function RxBinderGroupUtils.observeAllClassesBrio(binderGroup)
45
46
  assert(type(binderGroup) == "table", "Bad binderGroup")
46
47
 
47
- return RxBinderGroupUtils.observeBinders(binderGroup)
48
- :Pipe({
49
- Rx.flatMap(RxBinderUtils.observeAllBrio)
50
- })
48
+ return RxBinderGroupUtils.observeBinders(binderGroup):Pipe({
49
+ Rx.flatMap(RxBinderUtils.observeAllBrio) :: any,
50
+ }) :: any
51
51
  end
52
52
 
53
- return RxBinderGroupUtils
53
+ return RxBinderGroupUtils
@@ -1,3 +1,4 @@
1
+ --!strict
1
2
  --[=[
2
3
  Utility methods to observe bound objects on instances. This is what makes the Rx library with
3
4
  binders really good.
@@ -32,17 +33,20 @@ local RxBinderUtils = {}
32
33
  @param binder Binder<T>
33
34
  @return Observable<Brio<T>>
34
35
  ]=]
35
- function RxBinderUtils.observeLinkedBoundClassBrio(linkName, parent, binder)
36
+ function RxBinderUtils.observeLinkedBoundClassBrio<T>(
37
+ linkName: string,
38
+ parent: Instance,
39
+ binder: Binder.Binder<T>
40
+ ): Observable.Observable<Brio.Brio<T>>
36
41
  assert(type(linkName) == "string", "Bad linkName")
37
42
  assert(typeof(parent) == "Instance", "Bad parent")
38
43
  assert(Binder.isBinder(binder), "Bad binder")
39
44
 
40
- return RxLinkUtils.observeValidLinksBrio(linkName, parent)
41
- :Pipe({
42
- RxBrioUtils.flatMapBrio(function(_, linkValue)
43
- return binder:ObserveBrio(linkValue)
44
- end);
45
- })
45
+ return RxLinkUtils.observeValidLinksBrio(linkName, parent):Pipe({
46
+ RxBrioUtils.flatMapBrio(function(_, linkValue)
47
+ return binder:ObserveBrio(linkValue)
48
+ end),
49
+ })
46
50
  end
47
51
 
48
52
  --[=[
@@ -52,19 +56,20 @@ end
52
56
  @param instance Instance
53
57
  @return Observable<Brio<T>>
54
58
  ]=]
55
- function RxBinderUtils.observeChildrenBrio(binder, instance)
59
+ function RxBinderUtils.observeChildrenBrio<T>(
60
+ binder: Binder.Binder<T>,
61
+ instance: Instance
62
+ ): Observable.Observable<Brio.Brio<T>>
56
63
  assert(Binder.isBinder(binder), "Bad binder")
57
64
  assert(typeof(instance) == "Instance", "Bad instance")
58
65
 
59
- return RxInstanceUtils.observeChildrenBrio(instance)
60
- :Pipe({
61
- RxBrioUtils.flatMapBrio(function(child)
62
- return binder:ObserveBrio(child)
63
- end);
64
- })
66
+ return RxInstanceUtils.observeChildrenBrio(instance):Pipe({
67
+ RxBrioUtils.flatMapBrio(function(child)
68
+ return binder:ObserveBrio(child)
69
+ end) :: any,
70
+ }) :: any
65
71
  end
66
72
 
67
-
68
73
  --[=[
69
74
  Observes bound children classes.
70
75
 
@@ -76,7 +81,6 @@ end
76
81
  ]=]
77
82
  RxBinderUtils.observeBoundChildClassBrio = RxBinderUtils.observeChildrenBrio
78
83
 
79
-
80
84
  --[=[
81
85
  Observes ainstance's parent class that is bound.
82
86
 
@@ -84,21 +88,23 @@ RxBinderUtils.observeBoundChildClassBrio = RxBinderUtils.observeChildrenBrio
84
88
  @param instance Instance
85
89
  @return Observable<Brio<T>>
86
90
  ]=]
87
- function RxBinderUtils.observeBoundParentClassBrio(binder, instance)
91
+ function RxBinderUtils.observeBoundParentClassBrio<T>(
92
+ binder: Binder.Binder<T>,
93
+ instance: Instance
94
+ ): Observable.Observable<Brio.Brio<T>>
88
95
  assert(Binder.isBinder(binder), "Bad binder")
89
96
  assert(typeof(instance) == "Instance", "Bad instance")
90
97
 
91
- return RxInstanceUtils.observePropertyBrio(instance, "Parent")
92
- :Pipe({
93
- RxBrioUtils.switchMapBrio(function(child)
94
- if child then
95
- return RxBinderUtils.observeBoundClassBrio(binder, child)
96
- else
97
- return Rx.EMPTY
98
- end
99
- end);
100
- RxBrioUtils.onlyLastBrioSurvives();
101
- })
98
+ return RxInstanceUtils.observePropertyBrio(instance, "Parent"):Pipe({
99
+ RxBrioUtils.switchMapBrio(function(child: Instance)
100
+ if child then
101
+ return RxBinderUtils.observeBoundClassBrio(binder, child)
102
+ else
103
+ return Rx.EMPTY
104
+ end
105
+ end) :: any,
106
+ RxBrioUtils.onlyLastBrioSurvives() :: any,
107
+ }) :: any
102
108
  end
103
109
 
104
110
  --[=[
@@ -108,16 +114,15 @@ end
108
114
  @param instance Instance
109
115
  @return Observable<Brio<T>>
110
116
  ]=]
111
- function RxBinderUtils.observeBoundChildClassesBrio(binders, instance)
117
+ function RxBinderUtils.observeBoundChildClassesBrio(binders, instance: Instance)
112
118
  assert(type(binders) == "table", "Bad binders")
113
119
  assert(typeof(instance) == "Instance", "Bad instance")
114
120
 
115
- return RxInstanceUtils.observeChildrenBrio(instance)
116
- :Pipe({
117
- RxBrioUtils.flatMapBrio(function(child)
118
- return RxBinderUtils.observeBoundClassesBrio(binders, child)
119
- end);
120
- })
121
+ return RxInstanceUtils.observeChildrenBrio(instance):Pipe({
122
+ RxBrioUtils.flatMapBrio(function(child)
123
+ return RxBinderUtils.observeBoundClassesBrio(binders, child)
124
+ end) :: any,
125
+ })
121
126
  end
122
127
 
123
128
  --[=[
@@ -127,7 +132,7 @@ end
127
132
  @param instance Instance
128
133
  @return Observable<T?>
129
134
  ]=]
130
- function RxBinderUtils.observeBoundClass(binder, instance)
135
+ function RxBinderUtils.observeBoundClass<T>(binder: Binder.Binder<T>, instance: Instance): Observable.Observable<T?>
131
136
  assert(Binder.isBinder(binder), "Bad binder")
132
137
  assert(typeof(instance) == "Instance", "Bad instance")
133
138
 
@@ -150,7 +155,10 @@ end
150
155
  @param instance Instance
151
156
  @return Observable<Brio<T>>
152
157
  ]=]
153
- function RxBinderUtils.observeBoundClassBrio(binder, instance)
158
+ function RxBinderUtils.observeBoundClassBrio<T>(
159
+ binder: Binder.Binder<T>,
160
+ instance: Instance
161
+ ): Observable.Observable<Brio.Brio<T>>
154
162
  assert(Binder.isBinder(binder), "Bad binder")
155
163
  assert(typeof(instance) == "Instance", "Bad instance")
156
164
 
@@ -172,7 +180,7 @@ function RxBinderUtils.observeBoundClassBrio(binder, instance)
172
180
  handleClassChanged(binder:Get(instance))
173
181
 
174
182
  return maid
175
- end)
183
+ end) :: any
176
184
  end
177
185
 
178
186
  --[=[
@@ -182,7 +190,7 @@ end
182
190
  @param instance Instance
183
191
  @return Observable<Brio<T>>
184
192
  ]=]
185
- function RxBinderUtils.observeBoundClassesBrio(binders, instance)
193
+ function RxBinderUtils.observeBoundClassesBrio<T>(binders, instance: Instance): Observable.Observable<Brio.Brio<T>>
186
194
  assert(type(binders) == "table", "Bad binders")
187
195
  assert(typeof(instance) == "Instance", "Bad instance")
188
196
 
@@ -193,8 +201,8 @@ function RxBinderUtils.observeBoundClassesBrio(binders, instance)
193
201
  end
194
202
 
195
203
  return Rx.of(unpack(observables)):Pipe({
196
- Rx.mergeAll();
197
- })
204
+ Rx.mergeAll() :: any,
205
+ }) :: any
198
206
  end
199
207
 
200
208
  --[=[
@@ -203,7 +211,7 @@ end
203
211
  @param binder Binder
204
212
  @return Observable<Brio<T>>
205
213
  ]=]
206
- function RxBinderUtils.observeAllBrio(binder)
214
+ function RxBinderUtils.observeAllBrio<T>(binder: Binder.Binder<T>): Observable.Observable<Brio.Brio<T>>
207
215
  assert(Binder.isBinder(binder), "Bad binder")
208
216
 
209
217
  return Observable.new(function(sub)
@@ -226,7 +234,7 @@ function RxBinderUtils.observeAllBrio(binder)
226
234
  end
227
235
 
228
236
  return maid
229
- end)
237
+ end) :: any
230
238
  end
231
239
 
232
240
  --[=[
@@ -235,7 +243,7 @@ end
235
243
  @param binder Binder
236
244
  @return Observable<Brio<{ T }>>
237
245
  ]=]
238
- function RxBinderUtils.observeAllArrayBrio(binder)
246
+ function RxBinderUtils.observeAllArrayBrio<T>(binder: Binder.Binder<T>): Observable.Observable<Brio.Brio<{ T }>>
239
247
  assert(Binder.isBinder(binder), "Bad binder")
240
248
 
241
249
  return Observable.new(function(sub)
@@ -274,7 +282,7 @@ function RxBinderUtils.observeAllArrayBrio(binder)
274
282
  emit()
275
283
 
276
284
  return maid
277
- end)
285
+ end) :: any
278
286
  end
279
287
 
280
- return RxBinderUtils
288
+ return RxBinderUtils