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
Why does it need to be a const enum? From the docs:
Const enums can only use constant enum expressions and unlike regular enums they are completely removed during compilation. Const enum members are inlined at use sites.
The reason we used const enum is we wanted the code inlined at runtime; and it worked when the code was within the same repo. The issue, as it turns out, is that the create-react-app-typescript project does not compile code in /node_modules/ properly.
I will look into fixing that, to see if I can get this working properly.
As it seems that the issue is not typescript, I am closing this issue for now.
TypeScript Version: 3.0.0-dev.20180704
Search Terms: enum, npm, yarn, import, create react app
Reproduction Github Repository
https://github.com/stephenkiers/TypescriptRepo1
Remote Package Code
Target Package Code
Expected behavior:
Target Package should print
Full Name
Actual behavior:
TEST
is undefined, so there isUncaught TypeError: Cannot read property 'MINOR' of undefined
Playground Link:
Cannot recreate in playground, but made public github repo and youtube video
Related Issues: not really, but here are some possible similar issues
The text was updated successfully, but these errors were encountered: