---
title: "Discussion on \"Enums vs String Literal Types in TypeScript\" | Hashnode"
description: "Discussion on \"Enums vs String Literal Types in TypeScript\". In TypeScript, named constants can be created by using an enum or with a union of string literal types."
url: "https://hashnode.com/posts/enums-vs-string-literal-types-in-typescript/640dfc4c804387c50b9a3581"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Enums vs String Literal Types in TypeScript](https://brockherion.hashnode.dev/enums-vs-string-literal-types-in-typescript?utm_source=hashnode&utm_medium=feed)

In TypeScript, named constants can be created by using an enum or with a union of string literal types.

Mar 12, 2023 · 4 min read · brockherion.hashnode.dev  
Read the article

-   [#typescript](https://hashnode.com/tag/typescript)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#nodejs](https://hashnode.com/tag/nodejs)
-   [#web-development](https://hashnode.com/tag/web-development)

## Written by

[Brock Herion](https://hashnode.com/@brockherion)

@brockherion · Elmhurst, IL

  
[View profile](https://hashnode.com/@brockherion)

Caffeine Addicted Full Stack Cat Dad

I'm a full-stack developer from the Chicago suburbs. I primarily build applications using React, Typescript, and C#. I'm a big fan of Next.js and taking advantage of serverless technologies. Outside of development, I spend a lot of time reading and playing video games. I also happen to be a Sith Lord, so I spend a decent amount of time shooting lightning from my hands and spinning. It's a good trick.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
