Investigate alternative libraries for type generation than `jsdoc`

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

メンテナーはふだん 3 日以内に返信

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
リファクタリング
明瞭さ
説明が足りない
活発さ
静か
技術スタック
javascript, typescript

調査の方向性

まず tsgen パーサーと jsdoc CLI への依存関係を調査します。タプルと負の数に関して示されている制限を踏まえて、実行可能な代替ライブラリを比較し、TypeScript への変換後に tsc を使用するという注記も考慮します。jsdoc を置き換える、または維持するための、サポート可能で保守しやすい方向性を文書化できれば完了です。

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

説明

Moving away

It has come to my attention that the jsdoc CLI that the tsgen parser relies on has more or less died off given its commit history has effectively stopped.
With the only activity being dependency version bumps, it appears there is little hope of the project adding support for things like tuples or negative numbers, both of which serve as major limitations towards documenting Phaser's own API. (For instance, we physically cannot type RandomDataGenerator#sign with the 2 values it is contractually obligated to return as jsdoc will crash when trying to parse the union -1 | 1).

Unless a major revival is launched in the near future (which it likely won't be), it may be wise to start thinking of alternate means of generating type documentation long-term. (I'd strongly advise against an in-house solution as the current one is ALREADY incomprehensible as is.)

I have created this issue as a "discussion board" of sorts to discuss various options for moving towards a more functional (and ideally better-maintained) solution for typegen that doesn't curb expressivity.

[!NOTE]
If the repository is ever converted to pure TypeScript OR plain JavaScript (by which I mean actual ESM classes and not "fake" class-building functions), tsc would likely be the best means of generating types for us.

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

環境構築

はじめの一歩

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

phaserjs/phaser のほかの issue

phaserjs/phaser の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

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

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