/**
 * Given an enum
 * ```ts
 * enum A {
 *   a = "a",
 *   b = "b"
 * }
 * ```
 * returns
 * ```ts
 * { a: 0,
 *   b: 1 }
 * ```
 */
export function enumToIndexMap(enumVar) {
    return Object.fromEntries(Object.keys(enumVar).map((key, i) => [key, i]));
}
//# sourceMappingURL=enum.js.map