Ship a TypeScript 7.1 content mapper for .rx, so tsgo/tsrs check .rx in one pass
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- node.js, typescript
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 127
- フォーク
- 7
- 平均マージ
- 15時間 42分
- マージ済み PR(30日)
- 63
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
solidjs/reactivescript のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
solidjs/reactivescript#96 ·
メンテナーはふだん 1 日以内に返信
-
Vite front end keeps serving a failed build after the missing/broken imported module is fixed対応中かも @cgaaf が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
solidjs/reactivescript#84 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
solidjs/reactivescript#77 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
solidjs/reactivescript#74 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 62/100
solidjs/reactivescript#97 ·
メンテナーはふだん 1 日以内に返信
solidjs/reactivescript の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
GetStream/stream-chat-react#3467 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
vercel-labs/ui#1139 ·
メンテナーはふだん 1 日以内に返信
-
generate_image reference URL guard lets through IPv4-mapped IPv6 hosts and 100.64.0.0/10対応中かも @goranai が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
bot:ai-assisted component:platform-js status:untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
midnightntwrk/platform-js#93 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100