Migrate JavaScript runtime to TypeScript
See original GitHub issueThe JavaScript ANTLR4 runtime is getting to a size where it’s difficult to maintain in JavaScript. (One data point on this is that JavaScript > 10 KLOC effectively becomes read-only and fixing bugs becomes difficult.) One possible approach to mitigating this would be to migrate the codebase to the TypeScript language (a superset of JavaScript that adds static type checking and modern JavaScript constructs while transpiring into plain JavaScript.) The tools support for TypeScript is good and getting stronger.
I’ve made a couple of test migration experiments, and think I’m ready to do this for real. I’ve already found a number of bugs in the runtime through static type checking. A couple of questions before I too far into it?
- Would this get support from the ANTLR4 community? Its not a one-man effort. Any volunteers?
- After several experiments, I think it probably should be made a replacement for the existing JavaScript runtime. I think this will best allow comparison of the original and generated
.js
file versions. Sound OK?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:19
- Comments:31 (19 by maintainers)
Top Results From Across the Web
Documentation - Migrating from JavaScript - TypeScript
Converting a JavaScript codebase over to TypeScript is, while somewhat tedious, usually not challenging. In this tutorial, we're going to look at how...
Read more >How to Migrate Application From JavaScript to TypeScript
Start by adding TypeScript to your build pipeline. Then migrate each code file one-by-one.
Read more >ts-migrate: A Tool for Migrating to TypeScript at Scale - Medium
Let's walk through the main steps needed to migrate a project from JavaScript to TypeScript and how those steps are implemented: 1) The...
Read more >A simple guide for migrating from JavaScript to TypeScript
This article shows you how to easily migrate a React component from JavaScript to TypeScript to improve your project.
Read more >8 Steps to Migrating from JavaScript to TypeScript | Blog
Prepare Yourself · Rename Files · Fix Compiling Errors · Fix Test Cases · Refactor Code · Fix Minification · Auto-Generate Google Closure...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I submitted several pull requests that should resolve the majority of the feature gap remaining in tunnelvisionlabs/antlr4ts. I still need to make improvements to the distribution strategy (reduce the time it takes to get updates published to npmjs), but overall it seems to be getting to a good state.
Any chance of adding links on the antlr website to support external projects that implement antlr for other languages or promote the upstream of those projects to antrl organization?
I think the projects would benefit from some marketing.