Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript generic class component props not parsed #550

Open
oygen87 opened this issue Dec 1, 2021 · 0 comments
Open

Typescript generic class component props not parsed #550

oygen87 opened this issue Dec 1, 2021 · 0 comments

Comments

@oygen87
Copy link

oygen87 commented Dec 1, 2021

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 oygen87 changed the title Generic class component props not parsed Typescript generic class component props not parsed Dec 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants