TypeScript's const modifier on type parameteres breaks syntax highlighting in `.tsx` files
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- typescript
- Lĩnh vực
- tooling
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện hàm generic được cung cấp trong cả tệp .ts và .tsx, sau đó kiểm tra các tệp ngữ pháp TypeScript TextMate trong repository này. So sánh cách ngữ pháp token hóa tham số kiểu const trong từng phần mở rộng; được xem là hoàn tất khi ví dụ .tsx nhận được phần tô sáng cú pháp nhất quán với phiên bản .ts.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Type: Bug
- Create a file
repro.ts. - Paste the code below.
- See that the syntax highlighting works fine.
- Change the extension to
.tsx. - See that the syntax highlighting is broken.
export const always = <const T,>(value: T) => {
return () => value
}
repro.ts:
repro.tsx:
Context: https://devblogs.microsoft.com/typescript/announcing-typescript-5-0/#const-type-parameters
VS Code version: Code - Insiders 1.78.0-insider (Universal) (e410e7c66e7ce5c6bc31f73150d66857804a0ee9, 2023-04-28T12:31:32.032Z)
OS version: Darwin arm64 22.3.0
Modes:
Sandboxed: Yes
System Info
| Item | Value |
|---|---|
| CPUs | Apple M1 (8 x 24) |
| GPU Status | 2d_canvas: enabled canvas_oop_rasterization: disabled_off direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled metal: disabled_off multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok video_decode: enabled video_encode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: enabled |
| Load (avg) | 3, 3, 3 |
| Memory (System) | 8.00GB (0.13GB free) |
| Process Argv | |
| Screen Reader | no |
| VM | 0% |
A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythontb:30258533
vsc_aacf:30263846
pythonptprofiler:30281269
vshan820:30294714
pythondataviewer:30285072
vscod805:30301674
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593:30376534
pythonvs932:30404738
cppdebug:30492333
vsclangdf:30492506
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30618038
pylantcb52:30590116
nodejswelcome1:30587009
pyind779:30611226
pythonsymbol12:30651887
2i9eh265:30646982
6233i204:30725950
azdwalk:30721579
pythonms35:30671666
03d35959:30680466
24365598:30687740
pythonfmttext:30716741
pythoncmvfstr:30726892
fixshowwlkth:30724385
showsbindicator:30724477
pythongtdpath:30726887
- Ngôn ngữ chính
- TypeScript
- Star
- 471
- Fork
- 149
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
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 microsoft/TypeScript-TmLanguage
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
microsoft/TypeScript-TmLanguage#1071 ·
-
triste Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 5/100
microsoft/TypeScript-TmLanguage#1078 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
microsoft/TypeScript-TmLanguage#1076 · 6 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 55/100
microsoft/TypeScript-TmLanguage#1074 · 2 bình luận ·
-
typescript-basics: fix highlighting for triple-slash reference directives with preserve="true" Đang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 58/100
microsoft/TypeScript-TmLanguage#1066 · 1 bình luận ·
Tất cả issue của microsoft/TypeScript-TmLanguage
Issue tương tự
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 76/100
-
code-quality refactoring
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
langchain-ai/deepagents#6450 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
vercel/react-tweet#225 ·