I have an enum declared somewhere in a sub module, and I'd like to re-export it in my actual project.
module :
export enum name {
TOTO = "toto",
TITI = "titi",
}
export :
import { name } from "module"
export type name2 = name
index.ts:
switch (var) {
case name2.toto: // 'name2' only refers to a type, but is being used as a value here.
}
How can I not lose information that name2 is initially an enum ?
const name2 = name