UNPKG

@mpxjs/webpack-plugin

Version:

mpx compile core

27 lines (22 loc) 576 B
import { ReactNode, ComponentType } from 'react' declare global { namespace NodeJS { interface Global { [key: string]: any } } } export function getComponent (...args: any): object interface AsyncModule { __esModule: boolean default: ReactNode } interface AsyncSuspenseProps { type: 'component' | 'page' chunkName: string moduleId: string getFallback?: () => ComponentType<unknown> getLoading?: () => ComponentType<unknown> getChildren: () => Promise<AsyncModule> } export function getAsyncSuspense (props: AsyncSuspenseProps): ReactNode