Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error when importing enums from other files to be used in enums. #65

Open
0xF48 opened this issue Apr 23, 2024 · 0 comments
Open

error when importing enums from other files to be used in enums. #65

0xF48 opened this issue Apr 23, 2024 · 0 comments

Comments

@0xF48
Copy link

0xF48 commented Apr 23, 2024

i have code like the following ->

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.

@0xF48 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant