strothj / react-docgen-typescript-loader

Webpack loader to generate docgen information from Typescript React components.
Other
360 stars 47 forks source link

React build in interface is not supported #78

Closed vikingmute closed 4 years ago

vikingmute commented 4 years ago

Hey, everyone

I found the loader can't generate the right prop types when using React build in interface (eg. React.ButtonHTMLAttributes), the code sample as below

interface TestButtonProps extends React.ButtonHTMLAttributes<HTMLElement> {
  /** a really great prop */
  bestProp: string
}

export const Button: FC<TestButtonProps> = (props) => {
 ...
}

and the result screenshot is here:

屏幕快照 2019-12-30 下午8 56 13

Any help will be greatly appreciated!