@quenty/linkutils 13.30.1 → 13.31.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 +6 -0
- package/package.json +2 -2
- package/src/Shared/RxLinkUtils.lua +20 -11
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
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
|
+
# [13.31.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/linkutils@13.30.1...@quenty/linkutils@13.31.0) (2026-07-14)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **linkutils:** convert package to --!strict ([7e7d015](https://github.com/Quenty/NevermoreEngine/commit/7e7d015053d33f9aa50d144b8c869f5001c4e80a))
|
|
11
|
+
|
|
6
12
|
## [13.30.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/linkutils@13.30.0...@quenty/linkutils@13.30.1) (2026-05-30)
|
|
7
13
|
|
|
8
14
|
**Note:** Version bump only for package @quenty/linkutils
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/linkutils",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.31.0",
|
|
4
4
|
"description": "Utility functions for links. Links are object values pointing to other values!",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "13f0162f4971a77378e55e9b7236aea94f0dd3a8"
|
|
42
42
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
--!
|
|
1
|
+
--!strict
|
|
2
2
|
--[=[
|
|
3
3
|
@class RxLinkUtils
|
|
4
4
|
]=]
|
|
@@ -15,18 +15,21 @@ local RxInstanceUtils = require("RxInstanceUtils")
|
|
|
15
15
|
local RxLinkUtils = {}
|
|
16
16
|
|
|
17
17
|
-- Emits valid links in format Brio.new(link, linkValue)
|
|
18
|
-
function RxLinkUtils.observeValidLinksBrio(
|
|
18
|
+
function RxLinkUtils.observeValidLinksBrio(
|
|
19
|
+
linkName: string,
|
|
20
|
+
parent: Instance
|
|
21
|
+
): Observable.Observable<Brio.Brio<Instance, Instance>>
|
|
19
22
|
assert(type(linkName) == "string", "linkName should be 'string'")
|
|
20
23
|
assert(typeof(parent) == "Instance", "parent should be 'Instance'")
|
|
21
24
|
|
|
22
|
-
return RxInstanceUtils.observeChildrenBrio(parent):Pipe({
|
|
23
|
-
Rx.flatMap(function(brio)
|
|
25
|
+
return (RxInstanceUtils.observeChildrenBrio(parent) :: any):Pipe({
|
|
26
|
+
Rx.flatMap(function(brio): any
|
|
24
27
|
local instance: Instance = brio:GetValue()
|
|
25
28
|
if not instance:IsA("ObjectValue") then
|
|
26
29
|
return Rx.EMPTY
|
|
27
30
|
end
|
|
28
31
|
|
|
29
|
-
return RxBrioUtils.completeOnDeath(brio, RxLinkUtils.observeValidityBrio(linkName, instance))
|
|
32
|
+
return RxBrioUtils.completeOnDeath(brio, RxLinkUtils.observeValidityBrio(linkName, instance) :: any)
|
|
30
33
|
end),
|
|
31
34
|
})
|
|
32
35
|
end
|
|
@@ -38,12 +41,15 @@ end
|
|
|
38
41
|
@param parent Instance
|
|
39
42
|
@return Brio<Instance>
|
|
40
43
|
]=]
|
|
41
|
-
function RxLinkUtils.observeLinkValueBrio(
|
|
44
|
+
function RxLinkUtils.observeLinkValueBrio(
|
|
45
|
+
linkName: string,
|
|
46
|
+
parent: Instance
|
|
47
|
+
): Observable.Observable<Brio.Brio<Instance>>
|
|
42
48
|
assert(type(linkName) == "string", "linkName should be 'string'")
|
|
43
49
|
assert(typeof(parent) == "Instance", "parent should be 'Instance'")
|
|
44
50
|
|
|
45
|
-
return RxInstanceUtils.observeChildrenOfNameBrio(parent, "ObjectValue", linkName):Pipe({
|
|
46
|
-
RxBrioUtils.flatMapBrio(function(instance)
|
|
51
|
+
return (RxInstanceUtils.observeChildrenOfNameBrio(parent, "ObjectValue", linkName) :: any):Pipe({
|
|
52
|
+
RxBrioUtils.flatMapBrio(function(instance): any
|
|
47
53
|
return RxInstanceUtils.observePropertyBrio(instance, "Value", function(value: Instance?)
|
|
48
54
|
return value ~= nil
|
|
49
55
|
end)
|
|
@@ -53,11 +59,14 @@ end
|
|
|
53
59
|
|
|
54
60
|
-- Fires off everytime the link is reconfigured into a valid link
|
|
55
61
|
-- Fires with link, linkValue
|
|
56
|
-
function RxLinkUtils.observeValidityBrio(
|
|
62
|
+
function RxLinkUtils.observeValidityBrio(
|
|
63
|
+
linkName: string,
|
|
64
|
+
link: Instance
|
|
65
|
+
): Observable.Observable<Brio.Brio<Instance, Instance>>
|
|
57
66
|
assert(typeof(link) == "Instance" and link:IsA("ObjectValue"), "Bad link")
|
|
58
67
|
assert(type(linkName) == "string", "Bad linkName")
|
|
59
68
|
|
|
60
|
-
return Observable.new(function(sub)
|
|
69
|
+
return Observable.new(function(sub): Maid.Maid
|
|
61
70
|
local maid = Maid.new()
|
|
62
71
|
|
|
63
72
|
local function updateValidity()
|
|
@@ -76,7 +85,7 @@ function RxLinkUtils.observeValidityBrio(linkName: string, link: Instance)
|
|
|
76
85
|
updateValidity()
|
|
77
86
|
|
|
78
87
|
return maid
|
|
79
|
-
end)
|
|
88
|
+
end) :: any
|
|
80
89
|
end
|
|
81
90
|
|
|
82
91
|
return RxLinkUtils
|