reactjs / reactjs/react-docgen

Typescript generic class component props not parsed

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

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

flow new feature
主要言語
TypeScript
スター
3.8k
フォーク
316
平均マージ
5時間 7分
マージ済み PR(30日)
4

説明

Consider the example component below which is very common.
I cannot parse the props.
am i doing something incorrect here?
please copy paste in the playgrounds and try it for yourselves. https://reactcommunity.org/react-docgen/

import React, { Component } from 'react';

interface Props {
 /**
  * name of person
  */
  name: string;
}

class MyComponent<T extends Props> extends Component<T> {
  render() {
    <p>hello</p>
  }
}


export default MyComponent;

I expect to get the props parsed for this component from the interface 'Props' But no props are parsed.

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

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

はじめの一歩

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

調査の方向性

まず、提供されたジェネリックな TypeScript クラスコンポーネントを react-docgen playground に貼り付け、パーサーの出力を期待される Props インターフェースと比較します。クラスコンポーネントの props の解析エントリーポイントを調査し、ドキュメント化された name prop が抽出された時点で作業が完了したことを確認します。

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

評価

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

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

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