Ship a TypeScript 7.1 content mapper for .rx, so tsgo/tsrs check .rx in one pass
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 25/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- node.js, typescript
- Domaine
- developer-experience, tooling
Piste de recherche
Read notes/contentmappers.md and the sample at testdata/contentmapper/header-mapper/mapper.mjs to understand the protocol, then inspect the crate’s existing TSX projection and checker diagnostics mentioned in the issue. Determine how a wrapper can expose those outputs through initialize, openProject, transform, and closeProject; done means TS 7.1 and tsrs report both TypeScript and checker diagnostics for .rx in one pass.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Proposal
Ship a TypeScript 7.1 content mapper for .rx, beside (or eventually instead of) the Volar language plugin.
Why
rx-tsc and the language server run on Volar over TypeScript's JS API (typescript 6.x). TypeScript 7 (the Go compiler) has no plugin API of that kind. Projects that have moved their type checking to TS 7 or tsrs (the Rust port, which also hosts oxlint's type-aware rules) are left with two problems:
- They must run a second, slower checker just for
.rx. - Their editor's TS 7 language server doesn't know
.rxexists.
TypeScript 7.1 defines the extension point for this: content mappers. Here is how it works:
- A tsconfig declares
"contentMappers": [{ "package": "…", "extensions": [".rx"] }], and the package'spackage.jsonnames an executable undertypescript.contentMapper.exec. - The compiler spawns that executable with
--runExternalCodeand talks JSON-RPC over stdio. The methods areinitialize,openProject,transformandcloseProject. transformreturns{ text, extension: ".tsx", mappings: [[virtualStart, virtualLength, originalStart, originalLength, kind]], diagnostics }.
The compiler checks the virtual file as part of the program. It reports type errors at the original positions, and reports the mapper's own diagnostics as well.
tsrs implements this in the compiler, -b/incremental builds, the language server, the Node API and its linter. References: notes/contentmappers.md, and the ~80-line sample mapper in testdata/contentmapper/header-mapper/mapper.mjs.
Why it fits .rx well
The crate already produces everything transform needs:
- the TSX projection with exact mappings onto the
.rx(spec/11 CP-8c, spec/13 TY-1c,rxc project); - its own checker diagnostics with ranges, which map onto the mapper's
diagnostics.
So tsc -p, tsgo and tsrs -p would report TypeScript errors and checker errors for .rx in one pass, with no Volar in between. A small Node (or native) wrapper around the existing analysis would be enough. The Volar plugin can stay for TS 6 editors.
Context
We tried 0.3.1 in a Solid 2 app whose type checking runs on tsrs. rx-tsc works (it places TS errors on .rx correctly), but only as a separate pass on TypeScript 6.
- Langage dominant
- TypeScript
- Étoiles
- 127
- Forks
- 7
- Merge moyen
- 15 h 42 min
- PR mergées (30 j)
- 63
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de solidjs/reactivescript
-
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
solidjs/reactivescript#96 ·
Les mainteneurs répondent en général sous 1 jour
-
Vite front end keeps serving a failed build after the missing/broken imported module is fixedPeut-être pris @cgaaf l’a pris il y a 1 jour. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 77/100
solidjs/reactivescript#84 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
solidjs/reactivescript#77 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
solidjs/reactivescript#74 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 3/5 1-2 jours Accessibilité débutants 62/100
solidjs/reactivescript#97 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de solidjs/reactivescript
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
GetStream/stream-chat-react#3467 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
vercel-labs/ui#1139 ·
Les mainteneurs répondent en général sous 1 jour
-
generate_image reference URL guard lets through IPv4-mapped IPv6 hosts and 100.64.0.0/10Peut-être pris @goranai l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
Les mainteneurs répondent en général sous 1 jour
-
[Bug] IntegerRange.contains counts a non-integer just above max as inside an inclusive rangeOuvertebot:ai-assisted component:platform-js status:untriaged
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
midnightntwrk/platform-js#93 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100