$ show microsoft/vscode-typescript-next
This VS Code extension replaces the built-in TypeScript version with the nightly build of TypeScript (`typescript@next`), providing the latest TypeScript and JavaScript IntelliSense features. It is a small, focused extension that contributes TextMate grammars for JavaScript, TypeScript, JSX, and TSX syntax highlighting, sourced from the Microsoft/TypeScript-TmLanguage repository. The extension is designed for advanced users who want to test upcoming TypeScript features before they are officially released. The codebase is minimal: a package.json defining the extension, a set of grammar JSON files, and build scripts for updating the grammar and version. The CI pipeline (Azure Pipelines) automates the process of pulling the latest TypeScript nightly and publishing the extension. The extension is currently in a maintained state but with reduced activity, as the CI scheduled trigger is disabled to avoid picking up TypeScript 7. The grammars are large, well-structured TextMate definitions that follow standard patterns and are reusable in other editors. The overall codebase is functional and straightforward, but lacks original craftsmanship beyond the grammar modularity.
The LLM identified 2 files worth highlighting for reuse:
A comprehensive TextMate grammar for TypeScript React (TSX) syntax highlighting. It follows a highly modular design with named patterns (e.g., #expression, #type, #jsx-tag, #function-body) that are reused across multiple contexts. This structure makes it easy to extend or adapt for other editors. The grammar handles complex features like JSX, type annotations, destructuring, arrow functions, and JSDoc. Despite being derived from the upstream TypeScript-TmLanguage, its organization is a good example of a well-crafted TextMate grammar that can be extracted and reused in any editor supporting TextMate grammars.
A Node.js script that updates the syntax grammar files from the upstream TypeScript-TmLanguage repository. It downloads the latest grammars and replaces the local copies. This is a simple, isolated script that demonstrates a reusable pattern for keeping external grammar dependencies in sync. It could be adapted for any extension that relies on upstream grammar files, providing a way to automate updates via CI or manual runs.