Skip to content

Omit producing "JavaScript heap out of memory" with v3.3 #30068

@artola

Description

@artola

TypeScript Version: 3.4.0-dev.201xxxxx

  • 3.3.0-rc
  • 3.3.3333
  • 3.4.0-dev.20190223

Search Terms:
Omit

Code

// using "@types/react": "^16.8.4"

type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;

type XXX = Omit<React.HTMLAttributes<HTMLElement>, 'title'>;  // <= this alias is not working

Expected behavior:
It should work as early versions, last tested v3.2.4

Actual behavior:
Compiler throws "JavaScript heap out of memory" and same happens with VSCode Intellisense (stuck for minutes without proper answer).

Playground Link:

Tested code working with playground 3.3. (pasting @types/react at bottom), too big to share.

Related Issues:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs ProposalThis issue needs a plan that clarifies the finer details of how it could be implemented.SuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions