Skip to content

Nested Docs plugin callback signatures do not match current type hints #12972

Open
@ItsFrankieD

Description

@ItsFrankieD

Documentation Issue

The current documentation for Nested Docs shows generateLabel: (_, doc) and generateURL: (docs), while the type hint in the current version at the time of writing (3.44.0) shows generateLabel: (docs: Array<Record<string, unknown>>, currentDoc: Record<string, unknown>) and generateURL: (docs: Array<Record<string, unknown>>, currentDoc: Record<string, unknown>).

When I attempt to return something like currentDoc.title, I am given a TypeScript error as it assume I am returning unknown as opposed to a string.

The documentation needs to be updated, as in its current state it's unusable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions