Skip to content

Commit

Permalink
fix(rax-renderer): fix type issue during build
Browse files Browse the repository at this point in the history
  • Loading branch information
JackLian authored and liujuping committed Dec 22, 2022
1 parent c2db198 commit eafdf78
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions packages/rax-renderer/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ function factory() {
};
}

const RaxRenderer = factory();
const Engine = RaxRenderer;
const RaxRenderer: any = factory();
const Engine: any = RaxRenderer;

export {
Engine,
Expand Down
5 changes: 3 additions & 2 deletions packages/rax-renderer/src/renderer/block.tsx
Original file line number Diff line number Diff line change
@@ -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() {
Expand All @@ -21,4 +21,5 @@ export default function raxBlockRendererFactory() {
return that.__renderContextConsumer(children);
}
};
}
};
export default raxBlockRendererFactory;
5 changes: 3 additions & 2 deletions packages/rax-renderer/src/renderer/component.tsx
Original file line number Diff line number Diff line change
@@ -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() {
Expand Down Expand Up @@ -33,4 +33,5 @@ export default function raxComponentRendererFactory() {
return that.__renderContent(content);
}
};
}
};
export default raxComponentRendererFactory;
6 changes: 4 additions & 2 deletions packages/rax-renderer/src/renderer/page.tsx
Original file line number Diff line number Diff line change
@@ -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() {
Expand Down Expand Up @@ -33,4 +33,6 @@ export default function raxPageRendererFactory() {
}));
}
};
}
};

export default raxPageRendererFactory;

0 comments on commit eafdf78

Please sign in to comment.