function RxLinkUtils.observeValidLinksBrio(A,r)assert(type(A)=="\115\116\114\105\110\103","\108\105\110\107\078\097\109\101 \115\104\111\117\108\100 \098\101 \'\115\116\114\105\110\103\'")assert(typeof(r)=="\073\110\115\116\097\110\099\101","\112\097\114\101\110\116 \115\104\111\117\108\100 \098\101 \'\073\110\115\116\097\110\099\101\'")return(RxInstanceUtils.observeChildrenBrio(r)):Pipe({Rx.flatMap(function(r)local t=r:GetValue()if not t:IsA("\079\098\106\101\099\116\086\097\108\117\101")then return Rx.EMPTY end return RxBrioUtils.completeOnDeath(r,RxLinkUtils.observeValidityBrio(A,t))end)})end
-- Emits valid links in format Brio.new(link, linkValue)
function RxLinkUtils.observeValidLinksBrio(linkName, parent)
	assert(type(linkName) == "string", "linkName should be 'string'")
	assert(typeof(parent) == "Instance", "parent should be 'Instance'")

	return RxInstanceUtils.observeChildrenBrio(parent):Pipe({
		Rx.flatMap(function(brio)
			local instance = brio:GetValue()
			if not instance:IsA("ObjectValue") then
				return Rx.EMPTY
			end

			return RxBrioUtils.completeOnDeath(brio, RxLinkUtils.observeValidityBrio(linkName, instance))
		end),
	})
end
