Ship a TypeScript 7.1 content mapper for .rx, so tsgo/tsrs check .rx in one pass
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- node.js, typescript
- Lĩnh vực
- developer-experience, tooling
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 127
- Fork
- 7
- Merge trung bình
- 15 giờ 42 phút
- Pull request đã merge (30 ngày)
- 63
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của solidjs/reactivescript
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
solidjs/reactivescript#96 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Vite front end keeps serving a failed build after the missing/broken imported module is fixedCó thể đã có người làm @cgaaf đã nhận 1 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
solidjs/reactivescript#84 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
solidjs/reactivescript#77 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
solidjs/reactivescript#74 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 62/100
solidjs/reactivescript#97 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của solidjs/reactivescript
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
GetStream/stream-chat-react#3467 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
vercel-labs/ui#1139 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
generate_image reference URL guard lets through IPv4-mapped IPv6 hosts and 100.64.0.0/10Có thể đã có người làm @goranai đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] IntegerRange.contains counts a non-integer just above max as inside an inclusive rangeĐang mởbot:ai-assisted component:platform-js status:untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
midnightntwrk/platform-js#93 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100