--- Recursively sets the table as ReadOnly
-- @tparam table table Table to error on indexing
-- @treturn table table The same table

function Table.deepReadonly(table)
	for _, item in pairs(table) do
		if type(item) == "table" then
			Table.deepReadonly(item)
		end
	end

	return Table.readonly(table)
end

return Table
