import { EngineApisType } from '@lingxiteam/types'; import React, { FC } from 'react'; export declare function isAtLeastReact17(version: string): boolean; interface CustomModuleProps { /** * 代码 */ code: string | ((props: any) => JSX.Element); /** * 组件属性 */ compProps: Record; /** * 引擎能力 */ sandBoxLoadModule: EngineApisType['sandBoxLoadModule']; /** * 错误组件提供的信息 */ errorInfo: { id: string; /** * 自定义错误渲染信息 默认只打印错误日志,不做错误展示 * @param error * @param componentStack * @returns */ render?: (error: Error, componentStack: string | null) => React.ReactNode; }; /** * any */ allowMap?: Record; } declare const CustomModule: FC; export declare const getJSXHtml: (reactNode: React.ReactElement, cb?: ((html: string) => void) | undefined, options?: { id?: string; }) => void; export default CustomModule;