Is there better solution to manage type with enum?

I want to manage equipment data type like this.

EquipmentDataType

local ValueType = {
	Primary = 1,
	Secondary = 2,
}

local enumMT = {
	__newindex = function()
		error("Cannot modify enum table")
	end,
	__metatable = "Locked",
}
setmetatable(ValueType, enumMT)

return ValueType

Type of Equipment Data

type Data = {
	[EquipmentDataType.Primary]: number,
	[EquipmentDataType.Secondary]: number,
}

But it shows this error

Cannot have more than one table indexer.Luau Syntax Check.(multiple-table-indexer)

Is there any good solution instead of this?
Or can I fix this problem?

You should be able to do table.freeze on valuetype and get rid of the metatable stuff. Also I don’t think you can use variables when defining types.
Here’s how I’d do it

export type EquipmentEnum = number
return table.freeze({
	Primary = 1,
	Secondary = 2,
})

then

type Data = {[EquipmentDataType.EquipmentEnum]: number}
type Data = {
	[EquipmentDataType.Primary | EquipmentDataType.Secondary]: number,
}

This removes the error, but if you were hoping to have only two defined indexes in the table whilst also not knowing the indexes until the table is created I’m not sure that is possible.