Help with type declaration

Hello!
I want to create a type corresponding to the class, and the code does work, but I’d like to know if there’s a better way to do this without just repeating everything thats already mentioned in the constructor? This is what I’ve done:

export type RoomType = { model: Model, doorPositions: { Vector3 } }

function RoomClass.new(model: Model, doorPositions: { Vector3 }): RoomType
	local newRoom = setmetatable({}, Room)
	newRoom.Model = model
	newRoom.DoorPositions = doorPositions
	return newRoom
end

Thanks!

Can’t you just do this:

export type RoomType = { model: Model, doorPositions: { Vector3 } }

function RoomClass.new(model: Model, doorPositions: { Vector3 }): RoomType
	local newRoom = {}
	newRoom.Model = model
	newRoom.DoorPositions = doorPositions
	return newRoom
end

Room is a table containing all of the object methods, as I’ve seen other people do, so it’s necessary to keep. The reason why it isn’t in the code segment is cos I decided to only put the relevant bits in for the question. Sorry for any confusion.