2021-10-27
2872
#typescript
Alexander Nnakwue
73729
Oct 27, 2021 â‹… 10 min read

TypeScript string enums, and when and how to use them

Alexander Nnakwue Software engineer. React, Node.js, Python, and other developer tools and libraries.

Recent posts:

Decoupling Monoliths Into Microservices With Feature Flags

Decoupling monoliths into microservices with feature flags

Explore how to effectively break down a monolithic application into microservices using feature flags and Flagsmith.

Kayode Adeniyi
Jul 25, 2024 â‹… 10 min read
Lots of multi-colored blue and purplish rectangles.

Animating dialog and popover elements with CSS @starting-style

Native dialog and popover elements have their own well-defined roles in modern-day frontend web development. Dialog elements are known to […]

Rahul Chhodde
Jul 24, 2024 â‹… 10 min read
Using Llama Index To Add Personal Data To Large Language Models

Using LlamaIndex to add personal data to LLMs

LlamaIndex provides tools for ingesting, processing, and implementing complex query workflows that combine data access with LLM prompting.

Ukeje Goodness
Jul 23, 2024 â‹… 5 min read
JavaScript logo on top of violet background

Exploring essential DOM methods for frontend development

Learn four groups of DOM methods and their uses to create responsive and dynamic webpages. A helpful DOM reference table is also included.

Chimezie Innocent
Jul 23, 2024 â‹… 12 min read
View all posts

2 Replies to "TypeScript string enums, and when and how to use them"

  1. Great article! Helped me a lot.

    I think I found one error:

    // this is same as
    // type direction = ‘UP’ | ‘DOWN’ | ‘LEFT’ | ‘RIGHT’;
    type direction = keyof typeof Direction;

    The comment should be:
    // type direction = ‘Up’ | ‘Down’ | ‘Left’ | ‘Right’;

  2. Hello Matt, yes thanks for the feedback and I’m glad you found the post helpful. We will update the comment as soon as possible. Thanks again

Leave a Reply