microsoft / microsoft/TypeScript

Unknown interface "ClassMethodDecoratorFunction" in documentation for 5.0.4 lib.decorators.d.ts

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

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

Bug Docs Domain: Decorators Help Wanted Needs Human Review
主要言語
Go
スター
111k
フォーク
14.4k
平均マージ
1日 19時間
マージ済み PR(30日)
117

説明

lib Update Request

Configuration Check

My compilation target is ES2021 and my lib is ["es2017", "dom"].

Missing / Incorrect Definition

The mentioned example:

const bound: ClassMethodDecoratorFunction = (value, context) {
  if (context.private) throw new TypeError("Not supported on private methods.");
  context.addInitializer(function () {
    this[context.name] = this[context.name].bind(this);
  });
}

Uses an Interface ClassMethodDecoratorFunction which isn't implemented - as far as I can tell this should be ClassMethodDecoratorContext instead

Documentation Link

v5.0.4/src/lib/decorators.d.ts

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

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

はじめの一歩

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

調査の方向性

src/lib/decorators.d.ts の 97 行目付近から始め、参照されている decorator interface を確認します。例の ClassMethodDecoratorFunction 参照と利用可能な宣言を比較し、その後、例の型チェックを行って、ドキュメントが未定義の interface をもう示していないことを確認します。

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

評価

技術スタック
typescript
領域
compilers
issue の種類
バグ
難易度
1/5
見積もり時間
1時間未満
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
52/100

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

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