From dc9963ca35ec0dcff211c99d57aaff55f1f00fe0 Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Sat, 11 Jun 2022 20:38:27 +0800 Subject: [PATCH] quick fix --- packages/docusaurus/src/commands/swizzle/actions.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 (