I want to define a map with predetermined strings in JSDoc. Such as:
/**
* @typedef {'string' | 'integer' | 'date'} ColumnTypes
* @type {Map<ColumnTypes, string>}
*/
typeMap = {
'string': 'varchar(max)',
'integer': 'decimal(18,4)',
'date': 'smalldatetime',
}
I tried to write it like that, but I didn’t see the options list for the keys like when I use @type {ColumnTypes}
How to define that the key should be inside those strings in ColumnTypes?