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

Possible to expand composed/nested types

Open dilipk3 opened this issue 5 months ago • 1 comments

I have my components TS interface like below:

export type ButtonVariant = 'subtle' | 'basic' | 'emphasized';

export type IconProps = {
  iconName?: string;
  iconSize?: number;
}
export interface ButtonProps  {
  variant: ButtonVariant;
  mediaProps: IconProps;
  /** Use onPress as a function to handle button press events */
  onPress: () => void;
  text: string;
}

react-docgen-typescript is able to deserialize the ButtonVariant string literal union. However, for the composed type IconProps, it just shows the name of the type. Is it possible to expand these composed types?

Image

dilipk3 avatar Jul 24 '25 23:07 dilipk3