Install via npm package:
yarn add mkenum
import makeEnum, {type IEnum} from 'mkenum'
// or
const makeEnum = require('mkenum')
const Env = makeEnum('a', 'b', 'c') // type {a: 'a', b: 'b', c: 'c'}
const a = Env.a // type 'a'
type EnvEnum = IEnum<typeof Env> // type 'a' | 'b' | 'c'