Derive union type from tuple/array values

Say I have an array: const list = ['a', 'b', 'c'] Is it possible to derive from this value union type that is 'a' | 'b' | 'c'? I want this because I want to define type which allows only values from