Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Begin evaluating parsing TypeScript with Babylon #2334
The TypeScript Team (specifically @andy-ms) has done an amazing job adding initial support for parsing TypeScript using Babylon.
The PR was just merged into master here: babel/babylon#523
I have been working with Andy for a while on trying to align the AST produced by
I have a dedicated repo for tracking that work here: https://github.com/JamesHenry/tsep-babylon-test
Babylon will throw in that case https://github.com/babel/babylon/blob/master/src/index.js (couldn't easily link line number as on mobile)
I spent a while this evening plugging in both TS parsers into the tests in order to begin narrowing down the differences. I will keep things on my branch for now, as it significantly increases the number of tests (and therefore the test execution time) and is still very much a WIP.
For reference, the tests that are currently broken using
I will identify the underlying AST differences causing these issues and then work with Andy and Daniel (TypeScript Team) to align. Some of them may have already been identified in my repo and just need to be resolved.