microsoft / microsoft/TypeScript

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

Open
#30,068 6 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Needs Proposal Suggestion
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

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:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue provides no repository file or test entry point. Start by reproducing the Omit<T, K> alias with @types/react under TypeScript 3.3/3.4 and compare it with 3.2.4; done means compilation and VSCode IntelliSense no longer exhaust the JavaScript heap.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.