Our great sponsors
-
promises-spec
An open standard for sound, interoperable JavaScript promises—by implementers, for implementers.
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
The spec has been out of date for years, it's a long standing issue unfortunately. In fact two years ago they decided that the official spec was no longer a concern to them at all. https://github.com/Microsoft/TypeScript/issues/15711
Dang, that GitHub thread is probably the most dramatic thread I’ve seen since the famous attempt to get Promises to work like monads.
It's not official, but swc includes an existing TypeScript parser written in a lower-level language. Swc is specifically designed for AST transformations. Currently the plugin system for custom transformers uses JS plugins which might not be fast enough for you. They are discussing implementing a Rust plugin system that would be faster. In the meantime you could pull out the parser code, and incorporate it into your own code.
If Rust isn't for you there is also esbuild which includes a TypeScript parser written in Go.
If you need to do efficient AST operations, have you considered treesitter? There is a typescript grammar available https://github.com/tree-sitter/tree-sitter-typescript