Question: I have tuple of `Maybe` types:

```
class Maybe<T>{ }

type MaybeTuple = [Maybe<string>, Maybe<number>, Maybe<boolean>];

```

and I want to turn this into a tuple of types:

`type TupleIWant = [string, number, boolean];`

so I tried this:

```
type ExtractTypes<T> = T extends Maybe<infer MaybeTypes>[] ? MaybeTypes : never;

type TypesArray = ExtractTypes<MaybeTuple>; // string | number | boolean NOT [string, number, boolean]

```

Which doesn't work :-(

I get `(string | number | boolean)[]` rather than the tuple I want: `[string, number, boolean]`

Is what I want to do currently possible?

Answer: 
You'll need to use a [mapped tuple type](https://github.com/Microsoft/TypeScript/issues/25947), which is supported in TypeScript 3.1.

You can make a mapped type that has properties `0`, `1`, `2` and `length` of the correct types, like this:

```
class Maybe<T> {}

type MaybeTuple = [Maybe<string>, Maybe<number>, Maybe<boolean>];

type MaybeType<T> = T extends Maybe<infer MaybeType> ? MaybeType : never;
type MaybeTypes<Tuple extends [...any[]]> = {
  [Index in keyof Tuple]: MaybeType<Tuple[Index]>;
} & {length: Tuple['length']};

let extractedTypes: MaybeTypes<MaybeTuple> = ['hello', 3, true];

```

If you're using an older version of typescript, you can use an unreleased version of TypeScript, or as a workaround, you can write a conditional type to match against tuples as long as you think you are likely to have, e.g., [like this](https://github.com/Microsoft/TypeScript/issues/25947#issuecomment-407929455).
You need to exclude the non-index keys of the array, or you'll also be mapping over `push`, `length`, etc:

```
type NumStrDate = [number, string, Date]
type IdxOf<T extends any[]> = Exclude<keyof T, keyof any[]>
type OrUndef<T extends any[]> = {[K in IdxOf<T>]: T[K] | undefined}
type MaybeNSD = OrUndef<NumStrDate>

const fine: MaybeNSD = [5, 'foo', undefined]
const problem: MaybeNSD = ['foo', undefined, undefined]

```

If you hover on `MaybeNSD` it will show you the resolved meaning:

```
type MaybeNSD = {
    0: number | undefined;
    1: string | undefined;
    2: Date | undefined;
}

```

[playground link](https://www.typescriptlang.org/play?#code/LAKALgngDgpgBAOQK4FsDKYBOARAhmeAXjgG0A7VAIxkwBo4BnLASzIHN68CBdUSWOAEkAJgA8A8gDMAPABU4MUQTLCGcXGQgluAPjjEAoqIDGAGyTCY0gNYwIAe0lxZ9Ww6catuvtHjjMAKoqMDLyisqq6praesQA3iQA0nCsQmJScjrcAFzOSdxwAD5wSMGSrDDCAL4+AgCyuBDUCGjY+nD+QZYyyOhYXDA6oKDG9mRMcOVkMLkNTTAtbcQkAKz0AOSS9vbr9KXdFcK8IKPjYHBQmPaUpjAos43Nre0km9u7JWWHe1-TR0A)