Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Props that are inherited from another component/library don't show up in the props table #1484

Closed
kaiyoma opened this issue Jan 26, 2021 · 2 comments

Comments

@kaiyoma
Copy link

kaiyoma commented Jan 26, 2021

Expected Behavior

The inherited props should appear.

Actual Behavior

The inherited props don't appear.

Steps to reproduce the bug

For components that wrap other components - like a wrapper around a component from npm that adds some additional functionality - it's common to extend props. Here's an example of wrapping around Col from Ant Design:

import { ColProps } from 'antd/lib/col';

type ColSizeProps = Pick<ColProps, 'lg' | 'md' | 'sm' | 'xl' | 'xs' | 'xxl'>;

interface Props extends ColSizeProps, Pick<ColProps, 'onMouseEnter' | 'onMouseLeave'> {
  (extra props here)
}

In the props table in Storybook, only the extra props are appearing. The extended/inherited props are not showing up.

Environment

  • Typedoc version: 0.20.16
  • TypeScript version: 4.1.3
  • Node.js version: 14.15.0
  • OS: Windows 10, Linux
@kaiyoma kaiyoma added the bug Functionality does not match expectation label Jan 26, 2021
@Dergash
Copy link
Contributor

Dergash commented Jan 26, 2021

Hello @kaiyoma! I was unable to reproduce this on 0.20.16 and 0.20.18: https://codesandbox.io/s/typedoc-test-forked-nh7fe?file=/src/index.ts

Could it be that you launch generation with --excludeExternals option? Or have Externals checkbox unchecked in API menu?

extarnals2

With this checkbox checked properties seems to be inherited:

externals1

@kaiyoma
Copy link
Author

kaiyoma commented Jan 26, 2021

Oh man, this is embarrassing, I filed this issue against the absolute wrong project. So sorry about that! typedoc is doing the right thing here. 😄

@kaiyoma kaiyoma closed this as completed Jan 26, 2021
@Gerrit0 Gerrit0 removed the bug Functionality does not match expectation label Feb 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants