Adding description to types
未关闭
还没有人认领这个 Issue。
- 主要语言
- JavaScript
- 星标
- 11.8k
- 派生
- 7.9k
- 平均合并
- 1 天 11 小时
- 30 天内合并 PR
- 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.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先,在文档生成器或 Storybook 设置中复现 issue 中的 ActionIconProps 示例。跟踪继承的 React 类型和 /** My custom property */ 描述是如何处理的;完成的标准是生成的文档保留这些继承属性和自定义属性的描述。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- react, storybook, typescript
- 领域
- documentation, tooling
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 32/100