Skip to content

Commit

Permalink
fix: broken types
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianWielga committed Oct 31, 2024
1 parent f612ef5 commit 2850236
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/FederatedComponent.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { Fragment, ReactNode, RefAttributes } from "react";
import React, { Fragment, RefAttributes } from "react";
import ReactDOM from "react-dom";
import { FederatedModuleProvider, FederatedModuleProviderProps } from "./FederatedModuleProvider";
import { useFederatedModule } from "./hooks";
Expand All @@ -14,7 +14,7 @@ function ComponentRender<P extends NonNullable<{ scope: ModuleString }>, T>({ sc

const Component = React.forwardRef(ComponentRender) as <P extends NonNullable<unknown>, T>(
props: { scope: ModuleString } & P & RefAttributes<T>,
) => ReactNode;
) => React.ReactElement;

export type FederatedComponentProps<P extends NonNullable<unknown>> = P & {
url: ModuleUrl;
Expand Down Expand Up @@ -48,7 +48,7 @@ function FederatedComponentRender<P extends NonNullable<unknown>, T>(

export const FederatedComponent = React.forwardRef(FederatedComponentRender) as <P extends NonNullable<unknown>, T = unknown>(
props: P & RefAttributes<T>,
) => ReactNode;
) => React.ReactElement;

interface LoaderOptions {
Wrapper?: React.FunctionComponent<React.PropsWithChildren<unknown>>;
Expand Down

0 comments on commit 2850236

Please sign in to comment.