From a060e618b1564e4ce04d703a97e94b26a76dba3e Mon Sep 17 00:00:00 2001 From: benjdlambert Date: Thu, 31 Jul 2025 16:23:14 +0200 Subject: [PATCH] chore: remove `ComponentType` types Signed-off-by: benjdlambert --- .../src/blueprints/AppRootWrapperBlueprint.tsx | 8 +++++--- .../src/blueprints/RouterBlueprint.tsx | 10 +++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/packages/frontend-plugin-api/src/blueprints/AppRootWrapperBlueprint.tsx b/packages/frontend-plugin-api/src/blueprints/AppRootWrapperBlueprint.tsx index ca5ea2d5fa..1002f9a383 100644 --- a/packages/frontend-plugin-api/src/blueprints/AppRootWrapperBlueprint.tsx +++ b/packages/frontend-plugin-api/src/blueprints/AppRootWrapperBlueprint.tsx @@ -14,11 +14,11 @@ * limitations under the License. */ -import { ComponentType, PropsWithChildren } from 'react'; +import { ReactNode } from 'react'; import { createExtensionBlueprint, createExtensionDataRef } from '../wiring'; const componentDataRef = createExtensionDataRef< - ComponentType> + (props: { children: ReactNode }) => JSX.Element | null >().with({ id: 'app.root.wrapper' }); /** @@ -35,7 +35,9 @@ export const AppRootWrapperBlueprint = createExtensionBlueprint({ dataRefs: { component: componentDataRef, }, - *factory(params: { component: ComponentType> }) { + *factory(params: { + component: (props: { children: ReactNode }) => JSX.Element | null; + }) { yield componentDataRef(params.component); }, }); diff --git a/packages/frontend-plugin-api/src/blueprints/RouterBlueprint.tsx b/packages/frontend-plugin-api/src/blueprints/RouterBlueprint.tsx index 308d560f00..97870b8589 100644 --- a/packages/frontend-plugin-api/src/blueprints/RouterBlueprint.tsx +++ b/packages/frontend-plugin-api/src/blueprints/RouterBlueprint.tsx @@ -14,11 +14,11 @@ * limitations under the License. */ -import { ComponentType, PropsWithChildren } from 'react'; +import { ReactNode } from 'react'; import { createExtensionBlueprint, createExtensionDataRef } from '../wiring'; const componentDataRef = createExtensionDataRef< - ComponentType> + (props: { children: ReactNode }) => JSX.Element | null >().with({ id: 'app.router.wrapper' }); /** @public */ @@ -29,7 +29,11 @@ export const RouterBlueprint = createExtensionBlueprint({ dataRefs: { component: componentDataRef, }, - *factory({ component }: { component: ComponentType> }) { + *factory({ + component, + }: { + component: (props: { children: ReactNode }) => JSX.Element | null; + }) { yield componentDataRef(component); }, });