---
title: "Discussion on \"Enums in TypeScript\" | Hashnode"
description: "Discussion on \"Enums in TypeScript\". Here is the typescript file where I have compared enums with types\n//Okay now lets do this\n//basically when want to have a function, that should only some particular values, and it will be string\n//one option is to create a if statment that can handl..."
url: "https://hashnode.com/posts/enums-in-typescript/66cad1a93efe4a6e7a90d96b"
---

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

Discussion

# [Enums in TypeScript](https://harshchandwani.hashnode.dev/enums-in-typescript?utm_source=hashnode&utm_medium=feed)

Here is the typescript file where I have compared enums with types //Okay now lets do this //basically when want to have a function, that should only some particular values, and it will be string //one option is to create a if statment that can handl...

Aug 25, 2024 · 2 min read · harshchandwani.hashnode.dev  
Read the article

-   [#typescript](https://hashnode.com/tag/typescript)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#enums](https://hashnode.com/tag/enums)

## Written by

[Harsh Chandwani](https://hashnode.com/@harshchandwani)

@harshchandwani · India

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

Software Dev | MERN Developer

Software Dev | 22 Years Old | Final Year Student | MERN Developer | GDSC Technical Core Member | ex- GeeksforGeeks | Writer | Poet |

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
