Abstract
We discuss two adaptations of the implementation of type guards and narrowing in the TypeScript compiler. The first is an improvement on the original syntax-directed implementation, and has now replaced the original one in the TypeScript compiler. It is specifically suited for the scenario in which an IDE requests the type of a particular variable in the program. The second implementation is defined as a whole program analysis, and is therefore able to compute more precise narrowed types, but at the price of a higher run-time cost.
| Original language | English |
|---|---|
| Title of host publication | Proceedings of the 2017 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation |
| Subtitle of host publication | PEPM 2017 |
| Publisher | Association for Computing Machinery |
| Pages | 111-122 |
| Number of pages | 12 |
| ISBN (Print) | 9781450347211 |
| DOIs | |
| Publication status | Published - 2 Jan 2017 |
Fingerprint
Dive into the research topics of 'Refining types using type guards in TypeScript'. Together they form a unique fingerprint.Cite this
- APA
- Author
- BIBTEX
- Harvard
- Standard
- RIS
- Vancouver