Skip to content

Possible to expand composed/nested types  #521

@dilipk3

Description

@dilipk3

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions