Skip to content

Commit

Permalink
fix: ensure demo types are satisfied with TypeScript@5
Browse files Browse the repository at this point in the history
  • Loading branch information
xaviemirmon authored Aug 9, 2024
1 parent 538cb05 commit 958dc25
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/core/types/Fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,11 @@ export type ObjectField<
Props extends { [key: string]: any } = { [key: string]: any }
> = BaseField & {
type: "object";
objectFields: {
[SubPropName in keyof Props]: Field<Props[SubPropName]>;
};
objectFields: Props extends any[]
? never
: {
[SubPropName in keyof Props]: Field<Props[SubPropName]>;
};
};

// DEPRECATED
Expand Down

0 comments on commit 958dc25

Please sign in to comment.