function Rx.mapTo(...)local q=table.pack(...)return function(f)assert(Observable.isObservable(f),"\066\097\100 \111\098\115\101\114\118\097\098\108\101")return Observable.new(function(P)return f:Subscribe(function()P:Fire(table.unpack(q,1,q.n))end,P:GetFailComplete())end)end end
--[=[
	https://rxjs.dev/api/operators/mapTo
	@param ... any -- The value to map each source value to.
	@return (source: Observable<T>) -> Observable<T>
]=]
function Rx.mapTo(...)
	local args = table.pack(...)
	return function(source)
		assert(Observable.isObservable(source), "Bad observable")

		return Observable.new(function(sub)
			return source:Subscribe(function()
				sub:Fire(table.unpack(args, 1, args.n))
			end, sub:GetFailComplete())
		end)
	end
end
