Skip to content

Commit

Permalink
chore: render type any in external component
Browse files Browse the repository at this point in the history
  • Loading branch information
prevwong committed Mar 9, 2024
1 parent 4e8b283 commit 1efd609
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/poor-balloons-explode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rekajs/types': patch
---

Use type any in external component render type
7 changes: 4 additions & 3 deletions packages/types/src/generated/types.generated.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Type, TypeConstructorOptions } from '../node';
import { Schema } from '../schema';

import { Type, TypeConstructorOptions } from '../node';

type StateParameters = {
program: Program;
extensions?: Record<string, ExtensionState>;
Expand Down Expand Up @@ -720,7 +721,7 @@ Schema.register('RekaComponent', RekaComponent);
type ExternalComponentParameters = {
meta?: Record<string, any>;
name: string;
render: Function;
render: any;
props?: Array<ComponentProp>;
};

Expand All @@ -729,7 +730,7 @@ export class ExternalComponent extends Component {
// @ts-ignore
private declare __isExternalComponent?: string;

declare render: Function;
declare render: any;
declare props: Array<ComponentProp>;
constructor(
value: ExternalComponentParameters,
Expand Down
2 changes: 1 addition & 1 deletion packages/types/src/types.definition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ Schema.define('RekaComponent', {
Schema.define('ExternalComponent', {
extends: 'Component',
fields: (t) => ({
render: t.type('Function'),
render: t.any,
props: t.defaultValue(t.array(t.node('ComponentProp')), []),
}),
});
Expand Down

0 comments on commit 1efd609

Please sign in to comment.