import * as React from "react"; import { AppProps, CustomProps, LifeCycleFn } from "single-spa"; export const SingleSpaContext: React.Context; type DeprecatedRenderTypes = | "createBlockingRoot" | "unstable_createRoot" | "unstable_createBlockingRoot"; type LegacyRenderType = "hydrate" | "render"; type RenderType = // React 18 "createRoot" | "hydrateRoot" | LegacyRenderType; export interface SingleSpaReactOpts { React: any; ReactDOM?: { [T in LegacyRenderType]?: any; }; ReactDOMClient?: { [T in RenderType]?: any; }; rootComponent?: | React.ComponentClass | React.FunctionComponent; loadRootComponent?: ( props?: RootComponentProps ) => Promise>; errorBoundary?: ( err: Error, errInfo: React.ErrorInfo, props: RootComponentProps ) => React.ReactElement; errorBoundaryClass?: React.ComponentClass; parcelCanUpdate?: boolean; suppressComponentDidCatchWarning?: boolean; domElementGetter?: (props: RootComponentProps) => HTMLElement; renderType?: RenderType | (() => RenderType); } export interface ReactAppOrParcel { bootstrap: LifeCycleFn; mount: LifeCycleFn; unmount: LifeCycleFn; update?: LifeCycleFn; } export default function singleSpaReact( opts: SingleSpaReactOpts ): ReactAppOrParcel;