Skip to content

Omit breaks in 3.9.2 #38531

Closed
Closed
@zombieJ

Description

@zombieJ

TypeScript Version:
3.9.2

Search Terms:
3.9.2 Omit

Code

interface A { 
  my: 'aaa';
}

interface B { 
  my: 'bbb';
}

interface C extends Omit<A & B, 'my'> { 
  my: string;
}

Expected behavior:

Can define my with Omited like prev version.

Actual behavior:

Property 'my' of type 'string' is not assignable to string index type 'never'.(2411)

Playground Link:

https://www.typescriptlang.org/play/?ssl=1&ssc=1&pln=12&pc=1#code/JYOwLgpgTgZghgYwgAgILIN7ILAChnIC2AngFzIDkc1FA3HgL556iSyIoBCmO+RZlAEbC6jZrlbR4SZAGFkEAB6QQAEwDOyAPKFgYADzoAZMk4AaSiQoA+HngIly6sFFABzeria4gA

Related Issues:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Working as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions