DEV Community

Discussion on: We don't have to use Enums on TypeScript? 【Discussion】

Collapse
 
paratron profile image
Christian Engel

Thats because you can also use enums to address things and use them as object keys for example.

For me thats not a problem, as long as the developer is aware of that.

The overhead added by them won't have a considerable impact on bundle size and/or performance.

Collapse
 
taishi profile image
Taishi

Thanks!

The overhead added by them won't have a considerable impact on bundle size and/or performance.

I know this but TypeScript shouldn't have any impact on complied JS files (as an object in Enums' case) in my opinion.
This is not just a file size issue.