Repository: TypeScript
Issue: `Omit`  helper loses type information when used with extended Records.
Labels: Needs Investigation,Fix Available,Rescheduled

<!-- 🚨 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.8 & Nightly

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**

- Omit
- Record
- Any
- Loses type information

**Expected behavior:**

I expect the following types to be as described in the inline comments.
```ts
type AnyRecord = Record<string, any>;
interface ExtendsAny extends AnyRecord {
   myKey1: string;
   myKey2: string;
}
// ExtendsAny['myKey1'] === string
// ExtendsAny['otherKey'] === any

type OmitsKey = Omit<ExtendsAny, "myKey2">;
// OmitsKey['myKey'] === string
// OmitsKey['otherKey'] === any
```

Please note that this works without the omit, or without the record, but not when both are used together.

**Actual behavior:**

What actually happens is that after using omit, all keys become "any" and any information for code completion, etc that the specifically defined keys even exist, are removed, even thought they were working in the original extension.

```ts
type AnyRecord = Record<string, any>;
interface ExtendsAny extends AnyRecord {
   myKey1: string;
   myKey2: string;
}
// ExtendsAny['myKey1'] === string
// ExtendsAny['otherKey'] === any

type OmitsKey = Omit<ExtendsAny, "myKey2">;
// 🚨Problem here 🚨
// OmitsKey['myKey1'] === any
// OmitsKey['otherKey'] === any


const instance: OmitsKey = {
    myKey1: "test",
}
// 🚨 When typing this no autocomplete is provided for myKey1 🚨
instance.myKey1.
```

<!-- Did you find other bugs that looked similar? -->
**Related Issues:**

- https://github.com/microsoft/TypeScript/issues/27883

**Potential Workaround**

In the meantime, I am redefining the base interface (very large) because it comes from a library without the record type mixed in. I do my omit, then add it back in afterwards.

**Code**
```ts
/**
 * @copyright 2020 Adam (charrondev) Charron
 * @license MIT
 */

export interface IBase<T = number> {
    baseProp: T;
    baseProp2: T;
    baseFunction: () => T;
}

const base: IBase<number> = {
    baseProp: 0,
    baseProp2: 0,
    baseFunction: () => 0,
};

// number
base.baseProp;

///
/// Without the omit
///
type AnyRecord = Record<string, any>;

interface IExtend<T> extends IBase<T>, AnyRecord {
    extendProp: T;
}

const extended: IExtend<number> = {
    baseProp: 0,
    baseProp2: 0,
    baseFunction: () => 0,
    extendProp: 0,
};

// number
extended.baseProp2;

///
/// With an Omit
///
interface IOmittedInterface extends Omit<IExtend<number>, "baseProp"> {}

const omitted: IOmittedInterface = {
    baseProp2: 0,
    baseFunction: () => 0,
};

// any
omitted.baseProp2;

```



<details><summary><b>Output</b></summary>

```ts
/**
 * @copyright 2020 Adam (charrondev) Charron
 * @license MIT
 */
const base = {
    baseProp: 0,
    baseProp2: 0,
    baseFunction: () => 0,
};
// number
base.baseProp;
const extended = {
    baseProp: 0,
    baseProp2: 0,
    baseFunction: () => 0,
    extendProp: 0,
};
// number
extended.baseProp2;
const omitted = {
    baseProp2: 0,
    baseFunction: () => 0,
};
// any
omitted.baseProp2;

```


</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](http://www.typescriptlang.org/play/?ts=Nightly#)