# shim=ENUM\_GET being ignored in api.ts file?

**URL:** <https://forum.makecode.com/t/shim-enum-get-being-ignored-in-api-ts-file/2194>\
**Category:** PXT\
**Created:** [May 22, 2020, 8:04pm UTC](https://forum.makecode.com/t/shim-enum-get-being-ignored-in-api-ts-file/2194 "2020-05-22T20:04:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bblumberg](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@bblumberg](https://forum.makecode.com/u/bblumberg)\
**Post date:** [May 22, 2020, 8:04pm UTC](https://forum.makecode.com/t/shim-enum-get-being-ignored-in-api-ts-file/2194/1 "2020-05-22T20:04:53Z")

</div>

I am getting up to speed on MakeCode/PXT and working through some of the examples. In particular, I am stuck on creating a block that can generate a enum per the playground example (color, flags, planets). In my api.ts file I have the following:

//% shim=ENUM\_GET  
//% blockId=color\_enum\_shim  
//% block=“Color $arg”  
//% enumName=“Colors”  
//% enumMemberName=“color”  
//% enumPromptHint=“e.g. Green, Orange, …”  
//% enumInitialMembers=“Red, Blue, Yellow”  
function \_colorEnumShim(arg: number) {  
return arg  
}

and what winds up in the sim.d.ts file in libs/core is:  
//% shim=ENUM\_GET  
//% blockId=color\_enum\_shim  
//% block=“Color $arg”  
//% enumName=“Colors”  
//% enumMemberName=“color”  
//% enumPromptHint=“e.g. Green, Orange, …”  
//% enumInitialMembers=“Red, Blue, Yellow”  
//% shim=dog::\_colorEnumShim  
function \_colorEnumShim(arg: number): number;

But the block doesn’t act as an enumeration, but rather a function that takes a number and returns a number.

Any help would be greatly appreciated. I am using the latest from github.
