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.
Documentation Issue
The current documentation for Nested Docs shows
generateLabel: (_, doc)andgenerateURL: (docs), while the type hint in the current version at the time of writing (3.44.0) showsgenerateLabel: (docs: Array<Record<string, unknown>>, currentDoc: Record<string, unknown>)andgenerateURL: (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 returningunknownas opposed to a string.The documentation needs to be updated, as in its current state it's unusable.