Repository: TypeScript
Issue: react-redux type inference is broken since v3.1
Labels: Bug

<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  3.1.0-dev.20180810

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** react-redux connect type inference

I've noticed this issue while upgrading from v3.0.3. Type inferrence got broken on some of redux's `connect` calls. I was able to isolate the issue (see the code below). The issue is reproducible on `@next` and `@latest`. I ran some regression tests and was able to narrow it down to `3.1.0-dev.20180810` where the bug was introduced. The last version where the code works as expected was `3.1.0-dev.20180809`.

**Code**

```ts
type MapStateToProps<TStateProps> = () => TStateProps;

type MergeProps<TStateProps, TMergedProps> = (stateProps: TStateProps) => TMergedProps;

function connect<TStateProps = {}, TMergedProps = {}>(
   mapStateToProps: MapStateToProps<TStateProps>,
   mergeProps: MergeProps<TStateProps, TMergedProps>) {
}

connect(() => ({ time: 123 }), ({ time }) => ({
   time,
   doSomething() {
   },
}))
```

**Expected behavior:** compiles without errors

**Actual behavior:** `error TS2459: Type 'TStateProps' has no property 'time' and no string index signature.`

**Playground Link:** [here](https://www.typescriptlang.org/play/#src=type%20MapStateToProps%3CTStateProps%3E%20%3D%20()%20%3D%3E%20TStateProps%3B%0D%0A%0D%0Atype%20MergeProps%3CTStateProps%2C%20TMergedProps%3E%20%3D%20(stateProps%3A%20TStateProps)%20%3D%3E%20TMergedProps%3B%0D%0A%0D%0Afunction%20connect%3CTStateProps%20%3D%20%7B%7D%2C%20TMergedProps%20%3D%20%7B%7D%3E(%0D%0A%20%20%20mapStateToProps%3A%20MapStateToProps%3CTStateProps%3E%2C%0D%0A%20%20%20mergeProps%3A%20MergeProps%3CTStateProps%2C%20TMergedProps%3E)%20%7B%0D%0A%7D%0D%0A%0D%0Aconnect(()%20%3D%3E%20(%7B%20time%3A%20123%20%7D)%2C%20(%7B%20time%20%7D)%20%3D%3E%20%7B%0D%0A%20%20%20return%20%7B%0D%0A%20%20%20%20%20%20time%2C%0D%0A%20%20%20%20%20%20doSomething()%20%7B%0D%0A%20%20%20%20%20%20%7D%2C%0D%0A%20%20%20%7D%0D%0A%7D)%0D%0A%0D%0Aconnect(()%20%3D%3E%20(%7B%20time%3A%20123%20%7D)%2C%20(%7B%20time%20%7D)%20%3D%3E%20(%7B%0D%0A%20%20%20doSomething()%20%7B%0D%0A%20%20%20%7D%2C%0D%0A%7D))%0D%0A%0D%0A%0D%0Aconnect(()%20%3D%3E%20(%7B%20time%3A%20123%20%7D)%2C%20(%7B%20time%20%7D)%20%3D%3E%20(%7B%0D%0A%20%20%20time%2C%0D%0A%20%20%20doSomething%3A%20()%20%3D%3E%20%7B%0D%0A%20%20%20%7D%2C%0D%0A%7D))%0D%0A%0D%0A%0D%0Aconnect(()%20%3D%3E%20(%7B%20time%3A%20123%20%7D)%2C%20(%7B%20time%20%7D)%20%3D%3E%20(%7B%0D%0A%20%20%20time%2C%0D%0A%20%20%20doSomething()%20%7B%0D%0A%20%20%20%7D%2C%0D%0A%7D))%0D%0A)

Somehow these examples compile without problem though:
```ts
// no 'expression body' in C# terms
connect(() => ({ time: 123 }), ({ time }) => {
   return {
      time,
      doSomething() {
      },
   }
})

// no 'time' on TMergedProps
connect(() => ({ time: 123 }), ({ time }) => ({
   doSomething() {
   },
}))

// property instead of a function
connect(() => ({ time: 123 }), ({ time }) => ({
   time,
   doSomething: () => {
   },
}))
```