# Enum Block

**URL:** <https://forum.makecode.com/t/enum-block/34197>\
**Category:** Help\
**Tags:** extension\
**Created:** [February 28, 2025, 6:00pm UTC](https://forum.makecode.com/t/enum-block/34197 "2025-02-28T18:00:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ARandomGuyOnMakeCode](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/arandomguyonmakecode/32/22983_2.png) [@ARandomGuyOnMakeCode](https://forum.makecode.com/u/ARandomGuyOnMakeCode)\
**Post date:** [February 28, 2025, 6:00pm UTC](https://forum.makecode.com/t/enum-block/34197/1 "2025-02-28T18:00:41Z")

</div>

I am aware of the many different ways to turn enums into blocks, but all those ways seem to require some kind of helper function. What I want to know is whether it is possible to make an enum block with just the enum. For example:

```auto
// Magicaly turns into a block without anything else needed, kinda like a class.
//% blockNamespace=tweenExtension
//% group="Create"
enum TweenState {
    //% block="Idle"
    Idle,
    //% block="playing"
    Playing,
    //% block="paused"
    Paused,
    //% block="canceled"
    Canceled,
    //% block="compleate"
    Complete
}

```

Is something like this possible?

---

<div class="post-metadata">

**Author:** ![Luke](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/luke/32/32519_2.png) [@Luke](https://forum.makecode.com/u/Luke)\
**Post date:** [March 1, 2025, 10:35pm UTC](https://forum.makecode.com/t/enum-block/34197/2 "2025-03-01T22:35:27Z")

</div>

> **[GitHub - sargedev/enums: JavaScript / TS Enums in block form](https://github.com/sargedev/enums)**
>
> JavaScript / TS Enums in block form

@Sarge made an extension!!

---

<div class="post-metadata">

**Author:** ![ARandomGuyOnMakeCode](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/arandomguyonmakecode/32/22983_2.png) [@ARandomGuyOnMakeCode](https://forum.makecode.com/u/ARandomGuyOnMakeCode)\
**Post date:** [March 4, 2025, 3:01am UTC](https://forum.makecode.com/t/enum-block/34197/3 "2025-03-04T03:01:10Z")

</div>

Thanks 👍
