DEV Community

Discussion on: TypeScript: How to use Enums

voiedev profile image
Charles Allen • Edited on

So basically, TypeScript converted it into a function that it can call to get the correct index.

I think that's actually an IIFE (function that's invoked immediately) that populates an object (in both directions)

dailydevtips1 profile image
Chris Bongers Author

Yep you are actually right there Charles 🙌