Help with TypeCheck on Tables

Why this isn’t working? :c

After you declare ‘Table’ in the line right after you created the type, you can’t add anything else to the table because it should’ve already been added to the table.

The correct way to do this is like so:

type TableType = {
	Function: (self: TableType) -> nil

local Table: TableType = {
	Function = function(self)
		return nil

1 Like

Tables don’t have an exact type itself, you make them yourself and apparently it is parametric:

type definedTableType<keyType, valueType> = {[keyType] : valueType}