Skip to content

react forwardRef shows up as namespace *and* function. #2461

Closed
@RobMayer

Description

@RobMayer

Search terms

react forwardref namespace function kind

Expected Behavior

exporting a forwardRef component should show up once in the generated docs, as a function, consistent with any other functional component.

Actual Behavior

typedoc has any forwardRef component showing up as both a namespace and a function

Steps to reproduce the bug

/**
* @function
* @group Component
*/
export const MyComp = forwardRef((props: { children?: ReactNode }, ref: ForwardedRef<any>) => {
   return <>{children}</>
});

Environment

  • Typedoc version: 0.25.4
  • TypeScript version: 5.0.4
  • Node.js version: 20.6.1
  • OS: win10

Metadata

Metadata

Assignees

No one assigned

    Labels

    no bugThis is expected behavior

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions