So I am importing file which contains the following values (and many other likes this)
export const COLUMN_TYPES = [
"integer",
"string",
"boolean",
"datetime",
"image",
"images",
"text",
"auth_key",
"enum_type"
];
Now, I don't want the type of the above to be Array<string>
since I am sure that it is only going to contain values.
If I don't write type and just import it gives following error
Cannot find module 'src/constants' or its corresponding type declarations.
What is the best way to fix this error? using Array<string>
even though our array is constant with specific values? use enums?