Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

ProtocolMessage TypeScript declarations don't specify type field

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
38/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
typescript
領域
api

調査の方向性

まず、ProtocolMessage とその Request、Event、Response サブクラスに対する vscode-debugprotocol の型宣言を見つけます。既存の ProtocolMessage.type フィールドと Event.event フィールドがどのように宣言されているかを確認します。サブクラスの宣言で要求されたリテラル判別子が提供され、TypeScript がそれらのフィールドからメッセージ型を絞り込めるようになれば、作業は完了です。

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

説明

In the vscode-debugprotocol package, the type declarations for the ProtocolMessage subclasses, Request, Event, Response, etc. don't specify the type field. ProtocolMessage.type is defined as type: 'request' | 'response' | 'event' | string at the ProtocolMessage level. If the type enum was specified on each subclass as request, response, ect, then TypeScript can automatically cast a ProtocolMessage to the respective subclass when you check the type field, which would save boilerplate.

Similar type declarations could also be used on the Event.event field and Event's subclasses.

主要言語
TypeScript
スター
306
フォーク
90
平均マージ
8時間 36分
マージ済み PR(30日)
3

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

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

はじめの一歩

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

microsoft/vscode-debugadapter-node のほかの issue

microsoft/vscode-debugadapter-node の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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