Repository: TypeScript
Issue: Incorrectly inferred object property as string literal value
Labels: Needs Investigation


<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ

Please fill in the *entire* template below.
-->

**TypeScript Version:**  3.9.2

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**
incorrectly inferred string index type
inferred object property in function return type 

**Expected behavior:**
The key values in each `Variation` should be inferred as string not the literal string value

**Actual behavior:**
The key values in each `Variation` are inferred as the literal string value of the first object

<!-- Did you find other bugs that looked similar? -->
**Related Issues:**
Possibly related: https://github.com/microsoft/TypeScript/issues/38759, 


**Code**
```ts

type Variation = {
    [testDescription: string]: () => void;
}

export type VariationProvider = {
  variations: Variation[];
};

export type VariationProviderFactory = (extras: object) => VariationProvider;

export function createVariationProvider(factory: VariationProviderFactory) {
  return factory;
}


createVariationProvider(() => {
  return {
    variations: [
      {
        foo: () => {}
      },
      {
        broken: () => {}
      },
    ]
  }
})

```



<details><summary><b>Output</b></summary>

```ts
export function createVariationProvider(factory) {
    return factory;
}
createVariationProvider(() => {
    return {
        variations: [
            {
                foo: () => { }
            },
            {
                broken: () => { }
            },
        ]
    };
});

```


</details>


<details><summary><b>Compiler Options</b></summary>

```json
{
  "compilerOptions": {
    "noImplicitAny": true,
    "strictNullChecks": true,
    "strictFunctionTypes": true,
    "strictPropertyInitialization": true,
    "strictBindCallApply": true,
    "noImplicitThis": true,
    "noImplicitReturns": true,
    "useDefineForClassFields": false,
    "alwaysStrict": true,
    "allowUnreachableCode": false,
    "allowUnusedLabels": false,
    "downlevelIteration": false,
    "noEmitHelpers": false,
    "noLib": false,
    "noStrictGenericChecks": false,
    "noUnusedLocals": false,
    "noUnusedParameters": false,
    "esModuleInterop": true,
    "preserveConstEnums": false,
    "removeComments": false,
    "skipLibCheck": false,
    "checkJs": false,
    "allowJs": false,
    "declaration": true,
    "experimentalDecorators": false,
    "emitDecoratorMetadata": false,
    "target": "ES2017",
    "module": "ESNext"
  }
}
```


</details>

**Playground Link:** [Provided](https://www.typescriptlang.org/play/?ssl=14&ssc=1&pln=15&pc=1#code/C4TwDgpgBAaghgJwJZ2Eg9gOygXigbwCgoSoBtYCAZ2ABFqBjZMNLALihuUwHMBdDgAoAlLgB8UAG7okAEwDchAL6EIADzDoEwKKEixEKVpgAKCdJLkQEuAsSmHUGTFQ7xkTrGT6Kli1RpaOnrQ7kbOZhZWCABicAzAWiC2gurACHCuUOgARgBWEAmiOBJhnqbmlrLW-uqa2lAAZgCumAnOUEwQqBBlxpFV1oKN8YkIIG6O-ZXRcQlJokQkCBDAzQjYI-PjvoR7XT19ETPVCIIi4nbLq+vYS6SSU85ZZPakV++kjejoQsUS+BUnygSgANG9SPdgTlzABrCCYP6XQEQkhgiF8ewqJTCQhAA)