import { ReactNode, Ref } from 'react'; import { GetJsonError } from './common'; import { MFEContextData } from './contexts/mfe-data-context'; import { EventBus } from './event-bus'; export type LoaderRef = EventBus; export type FallbackNode = NonNullable | null; export interface UnrestrictedLoaderProps { src: string; fallbackSrc?: string; /** Values in the object will be stringified and then parsed before being delivered to the MFE via props or context. */ data?: MFEContextData; basename?: string; loadingFallback?: FallbackNode; loadingFallbackDelayed?: boolean; errorFallback?: FallbackNode; className?: string; retries?: number; isHeadless?: boolean; cache?: boolean | number; onRequestError?(error: GetJsonError): boolean; } export type LoaderProps = Pick, 'src' | 'fallbackSrc' | 'data' | 'basename' | 'loadingFallback' | 'loadingFallbackDelayed' | 'errorFallback' | 'className' | 'retries' | 'cache' | 'onRequestError'>; export type LoaderDataProps = Pick & { LoadingFallback: () => JSX.Element; }; declare const UnrestrictedLoader: (props: UnrestrictedLoaderProps, ref: Ref) => import("react/jsx-runtime").JSX.Element; export declare const Loader: (props: LoaderProps> & { ref?: Ref; }) => ReturnType; export {}; //# sourceMappingURL=loader.d.ts.map