const STATES = ["queued", "done"] as const; type State = (typeof STATES)[number]; function label(state: State): string { return state === "done" ? "complete" : "waiting"; } console.log(STATES.map(label).join(", "));