-- ROBLOX deviation: IndexedResult annotated as any for now since we don't have tuple support in luau

type IndexedResult = any

function printResult(result: any, expected: any)
	if result.type == "throw" then
		return "function call threw an error"
	end

	if result.type == "incomplete" then
		return "function call has not returned yet"
	end

	if isEqualValue(expected, result.value) then
		return printCommon(result.value)
	end

	return printReceived(result.value)
end
