Skip to content
Open
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
9 changes: 4 additions & 5 deletions src/hook/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -259,16 +259,15 @@ export const useRemixForm = <

return hookReturn;
};
// Derived via instantiation expression so TFieldValues flows through correctly.
// handleSubmit, reset and register have signatures that differ from UseFormReturn,
// so we capture the real return type rather than intersecting manually.
export type UseRemixFormReturn<
TFieldValues extends FieldValues = FieldValues,
// biome-ignore lint/suspicious/noExplicitAny: defaults to any type
TContext = any,
TTransformedValues = TFieldValues,
> = UseFormReturn<TFieldValues, TContext, TTransformedValues> & {
handleSubmit: ReturnType<typeof useRemixForm>["handleSubmit"];
reset: ReturnType<typeof useRemixForm>["reset"];
register: ReturnType<typeof useRemixForm>["register"];
};
> = ReturnType<typeof useRemixForm<TFieldValues, TContext, TTransformedValues>>;
interface RemixFormProviderProps<
TFieldValues extends FieldValues = FieldValues,
// biome-ignore lint/suspicious/noExplicitAny: defaults to any type
Expand Down