TypeScript's const modifier on type parameteres breaks syntax highlighting in `.tsx` files
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- typescript
- 领域
- tooling
调研方向
首先在 .ts 和 .tsx 文件中分别复现提供的泛型函数,然后检查此仓库中的 TypeScript TextMate 语法文件。比较该语法在每种扩展名中如何对 const 类型参数进行标记化;当 .tsx 示例获得与 .ts 版本一致的语法高亮时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
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
- 主要语言
- TypeScript
- 星标
- 471
- 派生
- 149
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/TypeScript-TmLanguage 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
microsoft/TypeScript-TmLanguage#1071 ·
-
triste 未关闭
难度 5/5 一周以上 新手友好度 5/100
microsoft/TypeScript-TmLanguage#1078 ·
-
难度 3/5 1-2 天 新手友好度 68/100
microsoft/TypeScript-TmLanguage#1076 · 6 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 55/100
microsoft/TypeScript-TmLanguage#1074 · 2 条评论 ·
-
难度 1/5 1-3 小时 新手友好度 58/100
microsoft/TypeScript-TmLanguage#1066 · 1 条评论 ·
查看 microsoft/TypeScript-TmLanguage 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
-
area:tools bug good first issue help wanted priority:P2
难度 2/5 1-3 小时 新手友好度 90/100
TaewoooPark/Motifcode#14 ·
-
bug 🐞
难度 2/5 1-3 小时 新手友好度 68/100
-
[Bounty proposal] fix(web): memory insights count an evening memory on the next day ($25 proposed) 未关闭
难度 2/5 1-3 小时 新手友好度 84/100
BasedHardware/omi#15320 ·
-
难度 2/5 半天 新手友好度 78/100
vercel/vercel-plugin#199 ·