function Maid.GivePromise(y,d)if not d:IsPending()then return d end local I=d.resolved(d)local t=y:GiveTask(I)I:Finally(function()y[t]=nil end)return I end
--[=[
	Gives a promise to the maid for clean.

	@param promise Promise<T>
	@return Promise<T>
]=]
function Maid:GivePromise(promise)
	if not promise:IsPending() then
		return promise
	end

	local newPromise = promise.resolved(promise)
	local id = self:GiveTask(newPromise)

	-- Ensure GC
	newPromise:Finally(function()
		self[id] = nil
	end)

	return newPromise
end
