import * as React from 'react'; import { ComponentOptions, DefaultComponentImport, HOCOptions, HOCType, LazyImport } from '../types'; /** * creates a "lazy" component, like `React.lazy` * @see {@link useImported} or {@link useLazy} * @param {Function} loaderFunction - () => import('a'), or () => require('b') * @param {Object} [options] * @param {React.Component} [options.LoadingComponent] * @param {React.Component} [options.ErrorComponent] * @param {Function} [options.onError] - error handler. Will consume the real error. * @param {Function} [options.async = false] - enable React 16+ suspense. * * @example * const PageA = imported('./pageA', { async: true }); */ declare function loader(loaderFunction: DefaultComponentImport

, baseOptions?: Partial> & HOCOptions): HOCType; /** * React.lazy "as-is" replacement */ export declare function lazy(importer: LazyImport): React.FC; export default loader;