patternfly-org icon indicating copy to clipboard operation
patternfly-org copied to clipboard

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

Open jpuzz0 opened this issue 2 years ago • 0 comments

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.

jpuzz0 avatar Feb 22 '23 16:02 jpuzz0