react-docgen is not compatible with react-like libraries
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 35/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- react, typescript
- 領域
- documentation, tooling
研究方向
首先定位透過白名單限制類 React 程式庫的模組,然後使用提供的 preact-compat 元件重現此問題。驗證 PropTypes.func 的現有行為,並將其與預期輸出進行比較;當類 React 程式庫無需明確加入白名單即可產生相同的型別資訊時,即表示完成。
由索引模型根據 Issue 內容生成。
描述
There are some react-like libraries such as react-lite, preact-compat and other which use API of React for components including PropTypes. All react-docgen methods work well with these libraries. But [this module](react-docgen disables work with react-like libraries) disallows using it.
I have a preact-compat component:
import { h, Component, PropTypes } from 'preact-compat';
export default class MyComponent extends Component {
render() {
return <div>{this.props.children}</div>;
}
}
MyComponent.propTypes = {
myProp: PropTypes.func
};
Actual react-docgen returns this value for type of myProp:
{
name: 'custom',
raw: 'PropTypes.func'
}
If I add preact-compat to whitelist react-docgen returns expected result:
{
type: 'func'
}
- 主要語言
- TypeScript
- 星號
- 3.8k
- 分支
- 316
- 平均合併
- 9 分鐘
- 30 天內合併 PR
- 2
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
reactjs/react-docgen 的其他 Issue
-
Support Babel 8 in babelParser (loadPartialConfigSync)可能已有人在做 @Stanzilla 於 90 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 78/100
reactjs/react-docgen#1102 ·
-
難度 5/5 一週以上 新手友好度 20/100
reactjs/react-docgen#1005 · 4 個 reaction ·
-
難度 3/5 1-2 天 新手友好度 48/100
reactjs/react-docgen#997 ·
-
Functions showing as "unknown" when encased in parentheses可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉
難度 3/5 1-2 天 新手友好度 42/100
reactjs/react-docgen#994 · 1 則留言 ·
-
難度 4/5 3-5 天 新手友好度 25/100
reactjs/react-docgen#982 · 2 則留言 ·
查看 reactjs/react-docgen 的全部 Issue
相似的 Issue
-
難度 1/5 1 小時以內 新手友好度 75/100
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 72/100
jaegertracing/jaeger-ui#4596 ·
維護者通常 1 天內回覆
-
area:tui enhancement platform:macos
難度 2/5 1-3 小時 新手友好度 66/100
anthropics/claude-code#101490 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 66/100
netlify/netlify-mcp#75 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆