You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import {SOME_ENUM} from './enums'
export MY_ENUM {
A = SOME_ENUM
B
C
}
this doesn't work and when i compile i get error const enum member initializers can only contain literal values and other computed enum values I guess because I am importing enum from another file which works fine when using tsc to compile but i need to bundle into single file for web not just compile files into js. i have "preserveConstEnums": false and "isolatedModules": false in tsconfig.json
i need all enums to be inlined.
The text was updated successfully, but these errors were encountered:
0xF48
changed the title
error setting when importing enums from other files.
error when importing enums from other files to be used in enums.
Apr 23, 2024
i have code like the following ->
this doesn't work and when i compile i get error
const enum member initializers can only contain literal values and other computed enum values
I guess because I am importing enum from another file which works fine when usingtsc
to compile but i need to bundle into single file for web not just compile files into js. i have"preserveConstEnums": false
and"isolatedModules": false
in tsconfig.jsoni need all enums to be inlined.
The text was updated successfully, but these errors were encountered: