reactjs / reactjs/react.dev

Adding description to types

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

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

主要言語
JavaScript
スター
11.8k
フォーク
7.9k
平均マージ
1日 11時間
マージ済み PR(30日)
11

説明

Can we add types description for React types, that can be supported for docs generators?

For example we use next inheritance:

import React, { ButtonHTMLAttributes, FC } from 'react'

export interface ActionIconProps
  extends Pick<
      ButtonHTMLAttributes<HTMLButtonElement>,
      | 'title'
      | 'tabIndex'
      | 'className'
      | 'style'
      | 'aria-label'
      | 'aria-haspopup'
      | 'aria-expanded'
      | 'onClick'
      | 'onKeyDown'
      | 'onMouseDown'
      | 'onFocus'
      | 'onBlur'
      | 'disabled'
    > {
  /** My custom property */
  myProp: string
}

and in doc system like Storybook it generated without description.

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

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

はじめの一歩

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

調査の方向性

まず、issue にある ActionIconProps の例をドキュメントジェネレーターまたは Storybook のセットアップで再現します。継承された React 型と /** My custom property */ の説明がどのように処理されるかを追跡します。完了の条件は、生成されたドキュメントでこれらの継承プロパティおよびカスタムプロパティの説明が保持されることです。

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

評価

技術スタック
react, storybook, typescript
領域
documentation, tooling
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
32/100

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

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