Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(rax-renderer): fix type issue during build #1394

Merged
merged 1 commit into from
Dec 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;