diff --git a/packages/rax-renderer/src/index.ts b/packages/rax-renderer/src/index.ts index 2ea14ec1a..1947aa5ae 100644 --- a/packages/rax-renderer/src/index.ts +++ b/packages/rax-renderer/src/index.ts @@ -41,8 +41,8 @@ function factory() { }; } -const RaxRenderer = factory(); -const Engine = RaxRenderer; +const RaxRenderer: any = factory(); +const Engine: any = RaxRenderer; export { Engine, diff --git a/packages/rax-renderer/src/renderer/block.tsx b/packages/rax-renderer/src/renderer/block.tsx index 2b2d6c93a..8fa4a2731 100644 --- a/packages/rax-renderer/src/renderer/block.tsx +++ b/packages/rax-renderer/src/renderer/block.tsx @@ -1,6 +1,6 @@ import { blockRendererFactory, types } from '@alilc/lowcode-renderer-core'; -export default function raxBlockRendererFactory() { +const raxBlockRendererFactory: () => any = () => { const OriginBlock = blockRendererFactory(); return class BlockRenderer extends OriginBlock { render() { @@ -21,4 +21,5 @@ export default function raxBlockRendererFactory() { return that.__renderContextConsumer(children); } }; -} +}; +export default raxBlockRendererFactory; diff --git a/packages/rax-renderer/src/renderer/component.tsx b/packages/rax-renderer/src/renderer/component.tsx index 6f221b313..9943b3c2f 100644 --- a/packages/rax-renderer/src/renderer/component.tsx +++ b/packages/rax-renderer/src/renderer/component.tsx @@ -1,6 +1,6 @@ import { componentRendererFactory, types } from '@alilc/lowcode-renderer-core'; -export default function raxComponentRendererFactory() { +const raxComponentRendererFactory: () => any = () => { const OriginComponent = componentRendererFactory(); return class ComponentRenderer extends OriginComponent { render() { @@ -33,4 +33,5 @@ export default function raxComponentRendererFactory() { return that.__renderContent(content); } }; -} +}; +export default raxComponentRendererFactory; diff --git a/packages/rax-renderer/src/renderer/page.tsx b/packages/rax-renderer/src/renderer/page.tsx index af8b78d88..f6ebd3f7c 100644 --- a/packages/rax-renderer/src/renderer/page.tsx +++ b/packages/rax-renderer/src/renderer/page.tsx @@ -1,6 +1,6 @@ import { pageRendererFactory, types } from '@alilc/lowcode-renderer-core'; -export default function raxPageRendererFactory() { +const raxPageRendererFactory: () => any = () => { const OriginPage = pageRendererFactory(); return class PageRenderer extends OriginPage { async componentDidUpdate() { @@ -33,4 +33,6 @@ export default function raxPageRendererFactory() { })); } }; -} +}; + +export default raxPageRendererFactory; \ No newline at end of file