I have many parts in my code where I define specific types like this:
function foo (state: "open" | "closed") { ... }
I want to know if there is a way to define that type like interfaces. something like:
type State: "open" | "closed";
so I can use it in a clearer way:
function foo (state: State) { ... }