https://github.com/rictic/tsc_hang_from_if_statements
A repro of a TypeScript compiler issue with many nested if statements
https://github.com/rictic/tsc_hang_from_if_statements
Last synced: about 1 month ago
JSON representation
A repro of a TypeScript compiler issue with many nested if statements
- Host: GitHub
- URL: https://github.com/rictic/tsc_hang_from_if_statements
- Owner: rictic
- Created: 2019-05-22T00:37:58.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-22T00:40:43.000Z (about 7 years ago)
- Last Synced: 2025-01-12T16:42:17.427Z (over 1 year ago)
- Language: TypeScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This repo demonstrates a class of TypeScript program that appears to hang the TypeScript compiler (100% CPU usage for an extended period of time).
As a result, opening example_repro.ts in your text editor may cause it to consume a lot of resources.
## To repro
`tsc example_repro.ts --noEmit`
Or run:
```bash
npm install
npm run hang_typescript
```
A program to generate new examples of this pattern is provided at gen_repro.js.
`npm run generate` will write a new example to example_repro.ts