Re:Reconstant: Share constant definitions between programmin...
by yoav-lavi on Sunday March 07, 2021 @08:42AM
(#26375756)
Interesting idea, I would suggest looking into TypeScript enum support as well as it is a different syntax than the JS object based variant (the const string definition can be shared)
Edit: from the image it looks like you're using some non standard formatting for the JS output, using Prettier may be more standard - https://prettier.io
https://www.typescriptlang.org/docs/handbook/enums.html
Edit: from the image it looks like you're using some non standard formatting for the JS output, using Prettier may be more standard - https://prettier.io