-
- Notifications
You must be signed in to change notification settings - Fork 312
Open
Description
Hi, I try convert react-docgen props to JSON-schema. But in typescript and flow, we get different names by different ways to program.Just like this. This ReactReactNode makes me so confused. How should i do with it ?
import React, { ReactNode, Component } from 'react'; interface Props { content: ReactNode, children: React.ReactNode, } class TSReactComponent extends Component<Props> { render() { return ( <div>hello world</div> ); } } export default TSReactComponent;react-docgen result
{ "description": "", "displayName": "TSReactComponent", "methods": [], "props": { "content": { "required": true, "flowType": { "name": "ReactNode" }, "description": "" }, "children": { "required": true, "flowType": { "name": "ReactReactNode", "raw": "React.ReactNode" }, "description": "" } } }