strothj / react-docgen-typescript-loader

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

Props details not propagated when using Pick<Props, 'someProp'> #63

Open clintandrewhall opened 5 years ago

clintandrewhall commented 5 years ago

Props information is not propagating when using Pick<>.

interface ContainerProps {
  /** A great description **/
  firstProp: string;
  /** A better description **/
  secondProp: number;
}

type Props = Pick<ContainerProps, 'secondProp'>;

The table lists the props as 'any' with no description, and, strangely, that they're required.

Screen Shot 2019-09-25 at 2 37 20 PM Screen Shot 2019-09-25 at 2 37 32 PM