chore: remove ComponentType types

Signed-off-by: benjdlambert <ben@blam.sh>
This commit is contained in:
benjdlambert
2025-07-31 16:23:14 +02:00
parent 4a3885943a
commit a060e618b1
2 changed files with 12 additions and 6 deletions
@@ -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<PropsWithChildren<{}>>
(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<PropsWithChildren<{}>> }) {
*factory(params: {
component: (props: { children: ReactNode }) => JSX.Element | null;
}) {
yield componentDataRef(params.component);
},
});
@@ -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<PropsWithChildren<{}>>
(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<PropsWithChildren<{}>> }) {
*factory({
component,
}: {
component: (props: { children: ReactNode }) => JSX.Element | null;
}) {
yield componentDataRef(component);
},
});