Skip to content

Bug - documentation-framework extended interface/type alias properties are not parsed and displayed #3423

@jpuzz0

Description

@jpuzz0

Describe the problem
When attempting to display component props or some other type within the Props section of a component's documentation page, and the interface/type alias used extends or joins with another interface/type alias, those members are not parsed and displayed unless they're explicitly written.

Example:

interface ComponentBProps {
  propThree: string[];
  propFour: number[];
}

interface ComponentAProps extends ComponentBProps {
  propOne: string;
  propTwo: number;
}

Actual behavior
image

Expected behavior
image

Any other information?
Setting a type alias equal to another type (enum, interface, other type alias) also isn't accounted for. This will get complicated fast if type utilities are involved. e.g.

type SomeType = Omit<Pick<SomeOtherType, 'pickedProp'>, 'omittedPropOne' | 'omittedPropTwo'>

The dilemma here is that we have certain capabilities available to us syntactically in our code revolving around types that the documentation-framework is not currently capable of handling.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions