DEV Community

Discussion on: TypeScript: How to use Enums

Collapse
 
voiedev profile image
Charles Allen • Edited

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)

Collapse
 
dailydevtips1 profile image
Chris Bongers

Yep you are actually right there Charles 🙌