Help with autofill

Hello

Im trying to make autofill for a module script which stores the waves,
is it possible to autofill wave numbers aswell?

in the waves table, i have a table called enemies in which what im thinking of is to give autofill suggestions like enemy names into it, im not very familiar with type check nor i found any resources that could help so idk

the autofill will take the enemy names from another module scripts
if thats not possible would a folder containing names possible to extract the names from?

im doing this just to help my non scripters help to modify waves

It depends on how your data is structured. Assuming your enemies is a dictionary, you can define a type like this:

(Note you must have the New Luau type solver beta feature enabled for this to work)

local Enemies = {
	Enemy1 = {
		--
	},
	Enemy2 = {
		--
	},
}

export type Enemy = keyof<typeof(Enemies)>

local var: Enemy -- "Enemy1" or "Enemy2"


after i put them in the [number}: {} the autofill doesnt work
but works normally without [number]: {}

Also

when the table has a type it wont work
how can i keep the autofill on both places?

Disable Incremental typechecking and autocompletion in studio, it seems that it is a bug with that beta option

Of course, if you have it active.