function Promise.defer(f)local S=debug.traceback(nil,2)local v v=Promise._new(S,function(v,h,l)local u u=Promise._timeEvent:Connect(function()u:Disconnect()local N,P,s=runExecutor(S,f,v,h,l)if not N then h(s[1])end end)end)return v end Promise.Defer=Promise.defer

function Promise.defer(callback)
	local traceback = debug.traceback(nil, 2)
	local promise
	promise = Promise._new(traceback, function(resolve, reject, onCancel)
		local connection
		connection = Promise._timeEvent:Connect(function()
			connection:Disconnect()
			local ok, _, result = runExecutor(traceback, callback, resolve, reject, onCancel)

			if not ok then
				reject(result[1])
			end
		end)
	end)

	return promise
end
Promise.Defer = Promise.defer
