prefer-named-literal-union
Name repeated inline string literal unions in a module.
Why
Repeated literal unions can drift when a domain gains or loses a value.
Fix
Declare the domain in one type alias and reference that alias at each use.
Examples
interface Draft { state: "queued" | "running" | "done"; previousState: "queued" | "running" | "done";}type DraftState = "queued" | "running" | "done";interface Draft { state: DraftState; previousState: DraftState;}