Repository: TypeScript
Issue: Recursive conditional types are aliased
Labels: Suggestion,Experience Enhancement


I am trying to create a conditional type that converts 
```ts
type Before = {
  a: string;
  b: number;
  c: string | undefined;
  d: number | undefined;
  nested: {
    a2: string;
    b2: number;
    c2: string | undefined;
    d2: number | undefined;
    nested2: {
      a3: string;
      b3: number;
      c3: string | undefined;
      d3: number | undefined;
    };
  };
};

```

to
```ts
type After = {
  a: string;
  b: number;
  c?: string | undefined;
  d?: number | undefined;
  nested: {
    a2: string;
    b2: number;
    c2?: string | undefined;
    d2?: number | undefined;
    nested2: {
      a3: string;
      b3: number;
      c3?: string | undefined;
      d3?: number | undefined;
    };
  };
};

```

When I hover on `After` in the below code

```ts

const fnBefore = (input: Before) => {
  return input;
};

const fnAfter = (input: After) => {
  return input;
};
```

it shows
```ts
type After = {
    c?: string | undefined;
    d?: number | undefined;
    a: string;
    b: number;
    nested: Flatten<{
        c2?: string | undefined;
        d2?: number | undefined;
    } & {
        a2: string;
        b2: number;
        nested2: Flatten<{
            c3?: string | undefined;
            d3?: number | undefined;
        } & RequiredProps>;
    }>;
}

```

instead of properly converted type.

According to #22011

> If an conditional type is instantiated over 100 times, we consider that to be too deep.
At that point, we try to find the respective alias type that contains that conditional type.

only more complex types should be aliased, but I always face this issue.
Also for simple types:
```ts
type Simple = {
  nested: {
    a2: string;
    c2: string | undefined;
  };
};

```

**TypeScript Version:**  2.8.0-dev.201180314

**Full Code**

```ts
type Before = {
  a: string;
  b: number;
  c: string | undefined;
  d: number | undefined;
  nested: {
    a2: string;
    b2: number;
    c2: string | undefined;
    d2: number | undefined;
    nested2: {
      a3: string;
      b3: number;
      c3: string | undefined;
      d3: number | undefined;
    };
  };
};

type Simple = {
  nested: {
    a2: string;
    c2: string | undefined;
  };
};

type Flatten<T> = { [K in keyof T]: T[K] };

type OptionalPropNames<T> = { [P in keyof T]: undefined extends T[P] ? P : never }[keyof T];
type RequiredPropNames<T> = { [P in keyof T]: undefined extends T[P] ? never : P }[keyof T];

type OptionalProps<T> = { [P in OptionalPropNames<T>]: T[P] };
type RequiredProps<T> = { [P in RequiredPropNames<T>]: T[P] };

type MakeOptional<T> = { [P in keyof T]?: T[P] };

type ConvertObject<T> = Flatten<MakeOptional<OptionalProps<T>> & RequiredProps<T>>;

type DeepConvertObject<T> = ConvertObject<{ [P in keyof T]: DeepConvert<T[P]> }>;

type DeepConvert<T> = T extends object ? DeepConvertObject<T> : T;

type After = DeepConvert<Before>;
type SimpleAfter = DeepConvert<Simple>;

const fnBefore = (input: Before) => {
  return input;
};

const fnAfter = (input: After) => {
  return input;
};
```

**Expected behavior:**
The tooltip should be shown without aliases.

**Actual behavior:**
The tooltip is shown with aliases.