simple question there but I struggle to find an answer, all existing answers are for enum to array.
I wonder if there is a way to transform a string array:
const arr = [ 'a', 'b', 'c' ]
into the equivalent of
type myType = 'a' | 'b' | 'c'
?
simple question there but I struggle to find an answer, all existing answers are for enum to array.
I wonder if there is a way to transform a string array:
const arr = [ 'a', 'b', 'c' ]
into the equivalent of
type myType = 'a' | 'b' | 'c'
?