Is there an official language spec and/or lexical grammar for TS?

This page summarizes the projects mentioned and recommended in the original post on /r/typescript

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • TypeScript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • 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

  • promises-spec

    An open standard for sound, interoperable JavaScript promises—by implementers, for implementers.

  • Dang, that GitHub thread is probably the most dramatic thread I’ve seen since the famous attempt to get Promises to work like monads.

  • 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.

    SurveyJS logo
  • swc

    Rust-based platform for the Web

  • 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.

  • esbuild

    An extremely fast bundler for the web

  • If Rust isn't for you there is also esbuild which includes a TypeScript parser written in Go.

  • tree-sitter-typescript

    TypeScript grammar for tree-sitter

  • 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

  • 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.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts