Tim Deschryver 2/24/2020

Flagged enum, why and how

Read Original

This technical article explains the concept of flagged enums in TypeScript, detailing how they solve the problem of efficiently storing and transmitting collections of boolean values (like selected weekdays). It contrasts flagged enums with other data structures, demonstrates their implementation using bitwise operators (like << and |), and shows how to convert them for use with front-end interfaces like checkbox lists.

Flagged enum, why and how

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week