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

Created on 26 Jan 2021  路  2Comments  路  Source: TypeStrong/typedoc

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
bug

All 2 comments

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

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. 馃槃

Was this page helpful?
0 / 5 - 0 ratings