diff --git a/packages/docusaurus/src/commands/swizzle/actions.ts b/packages/docusaurus/src/commands/swizzle/actions.ts index 44aba75cca133..548de7aedf988 100644 --- a/packages/docusaurus/src/commands/swizzle/actions.ts +++ b/packages/docusaurus/src/commands/swizzle/actions.ts @@ -125,7 +125,10 @@ export async function wrap({ import ${componentName} from '@theme-${importType}/${themeComponentName}'; import type ${componentName}Type from '@theme/${themeComponentName}'; -type Props = ComponentProps; +type RawProps = ComponentProps; +// ComponentProps is a little buggy, quick fix. +// https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/60766 +type Props = unknown extends RawProps ? {} : RawProps; export default function ${wrapperComponentName}(props: Props): JSX.Element { return (