microsoft / microsoft/TypeScript-TmLanguage

JSDoc syntax highlighting/intellisense not working for JSDoc @import

オープン
#1,049 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
TypeScript
スター
471
フォーク
149
PR マージ指標
30日以内にマージされた PR はありません

説明

Type: Bug

Type the following into a JavaScript file:

/**
 * @import { JSONRuleDefinition } from "../types.ts";
 * @import { MemberNode } from "@humanwhocodes/momoa";
 * 
 * @typedef {Object} SortOptions
 * @property {boolean} caseSensitive
 * @property {boolean} natural
 * @property {number} minKeys
 * @property {boolean} allowLineSeparatedGroups
 * 
 * @typedef {"sortKeys"} SortKeysMessageIds
 * @typedef {"asc"|"desc"} SortDirection
 * @typedef {[SortDirection, SortOptions]} SortKeysRuleOptions
 * @typedef {JSONRuleDefinition<{ RuleOptions: SortKeysRuleOptions, MessageIds: SortKeysMessageIds }>} SortKeysRuleDefinition
 * @typedef {(a:string,b:string) => boolean} Comparator
 */

Expected: The @import statement to be highlighted similar to @typedef, and also for intellisense to give me suggestions when typing in between the curly braces.

Actual: Everything from the left curly brace to end of line after @import is green (same as any comment), and typing inside the curly braces does not bring up intellisense suggestions.

VS Code version: Code 1.98.2 (ddc367ed5c8936efe395cffeec279b04ffd7db78, 2025-03-12T13:32:45.399Z)
OS version: Windows_NT x64 10.0.26100
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz (8 x 2304)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 15.73GB (5.21GB free)
Process Argv --crash-reporter-id 6fc032af-f5bd-4f81-ac94-df9dc8e463fa
Screen Reader no
VM 0%
Extensions (30)
Extension Author (truncated) Version
astro-vscode ast 2.15.4
vscode-tailwindcss bra 0.14.11
vscode-eslint dba 3.0.10
vscode-deno den 3.43.6
EditorConfig Edi 0.17.2
code-runner for 0.12.2
copilot Git 1.293.0
copilot-chat Git 0.25.1
vscode-github-actions git 0.27.1
vscode-pull-request-github Git 0.106.0
vscode-mocha-test-adapter hbe 2.14.1
vscode-test-explorer hbe 2.22.1
dotenv mik 1.0.1
vscode-json5 mrm 1.0.0
vscode-docker ms- 1.29.4
remote-containers ms- 0.401.0
remote-wsl ms- 0.88.5
cpptools ms- 1.23.6
sublime-keybindings ms- 4.1.10
test-adapter-converter ms- 0.2.1
vetur oct 0.37.3
vscode-commons red 0.0.6
vscode-yaml red 1.17.0
rust-analyzer rus 0.3.2353
even-better-toml tam 0.21.2
jest-snapshot-language-support tle 1.1.1
pdf tom 1.2.2
sort-lines Tyr 1.12.0
vscode-mdx uni 1.8.13
markdown-pdf yza 1.5.0
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
2i9eh265:30646982
962ge761:30959799
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dwnewjupyter:31046869
nativerepl1:31139838
pythonrstrctxt:31112756
nativeloc2:31192216
iacca1:31171482
5fd0e150:31155592
dwcopilot:31170013
6074i472:31201624
dwoutputs:31242946
customenabled:31248079
5a9hg449:31230677
hdaa2157:31222309
copilot_t_ci:31222730
jda6j935:31233686
cp15370_t:31242499
copilothoveroff:31248523

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、VS Code 1.98.2 で提供された JavaScript JSDoc の例を再現し、@import と @typedef の現在の扱いを比較します。import 型が他の JSDoc 宣言と同様にハイライトされ、その波括弧内に候補が表示されれば完了です。変更後に両方の動作を確認してください。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
typescript
領域
tooling
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
52/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。