react-docgen icon indicating copy to clipboard operation
react-docgen copied to clipboard

Typescript generic class component props not parsed

Open oygen87 opened this issue 3 years ago • 0 comments

Consider the example component below which is very common. I cannot parse the props. am i doing something incorrect here? please copy paste in the playgrounds and try it for yourselves. https://reactcommunity.org/react-docgen/

import React, { Component } from 'react';

interface Props {
 /**
  * name of person
  */
  name: string;
}

class MyComponent<T extends Props> extends Component<T> {
  render() {
    <p>hello</p>
  }
}


export default MyComponent;

I expect to get the props parsed for this component from the interface 'Props' But no props are parsed.

oygen87 avatar Dec 01 '21 13:12 oygen87