[[トランスパイル]]のときに使用されていない場合は[[Tree-shaking]]可能な[[Enum (TypeScript)|Enum]]。 たとえば以下の`index.ts`を作成する。 ```ts const enum Color { Red, Blue, Yellow, } console.log(Color.Red, Color.Yellow); ``` これを`tsc`で`index.js`に[[トランスパイル]]すると、以下のようになる。 ```js "use strict"; console.log(0 /* Color.Red */, 2 /* Color.Yellow */); ``` コンパイル時に必要な項目のみがインラインで記載されている。