-
Notifications
You must be signed in to change notification settings - Fork 286
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
Documentation link
It doesn't exist yet.
Describe the problem
If I swizzle a component, e.g. ApiExplorer/index.tsx
, my TypeScript configuration will start complaining with errors such as this:
/ApiExplorer/Response/index.tsx(44,47): error TS2339: Property 'hide_send_button' does not exist on type 'DocFrontMatter'.
As far as I can, this is happening because docusaurus-openapi-docs is extending @docusaurus/theme-common/internal
and adding its own custom types to this namespace, and my TypeScript config isn't aware of it.
Is there a recommendation for how to configure tsconfig.json to support these custom types, or plans to stop doing this and define types in this package's namespace instead?
Suggested fix
- Document how to configure TypeScript to support custom
@docusaurus/theme-common/internal
type definitions - Move custom types into the definitions for this package, remove custom type definitions e.g.
theme-classic.d.ts
- Something else?
Workaround
Swizzling ApiExplorer/index
as JavaScript (.tsx
) rather than as TypeScript, works as expected.
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation