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: 
You can, at the cost that you have to apply `as const` assertion to `someArray`.

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

type GetItem<T> = T extends ReadonlyArray<infer I> ? I : never;

type SomeType = GetItem<typeof someArray>;  // 'one' | 'two' | 'three'

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