Skip to content

Commit

Permalink
fix: getButtonProps types (#597)
Browse files Browse the repository at this point in the history
  • Loading branch information
lifeiscontent committed Apr 28, 2024
1 parent 9a0e4a8 commit 3924d70
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/conform-dom/submission.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ export type ResetIntent<Schema = any> = {
};
};

export type UpdateIntent<Schema = unknown> = {
export type UpdateIntent<Schema = any> = {
type: 'update';
payload:
| {
Expand All @@ -339,15 +339,15 @@ export type UpdateIntent<Schema = unknown> = {
};
};

export type RemoveIntent<Schema extends Array<any> = any> = {
export type RemoveIntent<Schema = any> = {
type: 'remove';
payload: {
name: FieldName<Schema>;
index: number;
};
};

export type InsertIntent<Schema extends Array<any> = any> = {
export type InsertIntent<Schema = any> = {
type: 'insert';
payload: {
name: FieldName<Schema>;
Expand All @@ -358,7 +358,7 @@ export type InsertIntent<Schema extends Array<any> = any> = {
};
};

export type ReorderIntent<Schema extends Array<any> = any> = {
export type ReorderIntent<Schema = any> = {
type: 'reorder';
payload: {
name: FieldName<Schema>;
Expand All @@ -367,13 +367,13 @@ export type ReorderIntent<Schema extends Array<any> = any> = {
};
};

export type Intent<Schema = unknown> =
export type Intent<Schema = any> =
| ValidateIntent<Schema>
| ResetIntent<Schema>
| UpdateIntent<Schema>
| ReorderIntent<Schema extends Array<any> ? Schema : any>
| RemoveIntent<Schema extends Array<any> ? Schema : any>
| InsertIntent<Schema extends Array<any> ? Schema : any>;
| ReorderIntent<Schema>
| RemoveIntent<Schema>
| InsertIntent<Schema>;

export function getIntent(
serializedIntent: string | null | undefined,
Expand Down

0 comments on commit 3924d70

Please sign in to comment.