Question: I have array:

`const someArray = ['one', 'two', 'three'];`

and I have type:

`type SomeType = 'one' | 'two' | 'three';`

How can I get `SomeType` from `someArray`?

Answer: 
I found an even simpler solution.

```
const someArray = ['one', 'two', 'three'] as const;
                                       /* ^------- IMPORTANT!
                                          otherwise it'll just be `string[]` */

type SomeType = typeof someArray[number];  // 'one' | 'two' | 'three'

```
by 'filter' to ergodic return satisfy condition‘s element