function PromiseUtils.fromSignal(G)local l=Promise.new()local E l:Finally(function()E:Disconnect()E=nil end)E=G:Connect(function(...)l:Resolve(...)end)return l end
--[=[
	Creates a promise from a signal

	@param signal Signal<T>
	@return Promise<T>
]=]
function PromiseUtils.fromSignal(signal)
	local promise = Promise.new()
	local conn

	promise:Finally(function()
		conn:Disconnect()
		conn = nil
	end)

	conn = signal:Connect(function(...)
		promise:Resolve(...)
	end)

	return promise
end
