From 9b63b8bf113c4f36ba7a2a83bca098b9978d31bf Mon Sep 17 00:00:00 2001 From: Makisuo <31933546+Makisuo@users.noreply.github.com> Date: Mon, 5 Aug 2024 18:06:20 +0200 Subject: [PATCH] feat: export ReactFormApi (#868) * Update useForm.tsx * feat: export ReactFormApi --------- Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Co-authored-by: Leonardo Montini --- packages/react-form/src/index.ts | 1 + packages/react-form/src/useForm.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/react-form/src/index.ts b/packages/react-form/src/index.ts index e35e2c602..f9000b7e2 100644 --- a/packages/react-form/src/index.ts +++ b/packages/react-form/src/index.ts @@ -1,5 +1,6 @@ export * from '@tanstack/form-core' +export type { ReactFormApi } from './useForm' export { useForm } from './useForm' export type { UseField, FieldComponent } from './useField' diff --git a/packages/react-form/src/useForm.tsx b/packages/react-form/src/useForm.tsx index 173a505ad..cab1f19cc 100644 --- a/packages/react-form/src/useForm.tsx +++ b/packages/react-form/src/useForm.tsx @@ -10,7 +10,7 @@ import type { NodeType } from './types' /** * Fields that are added onto the `FormAPI` from `@tanstack/form-core` and returned from `useForm` */ -interface ReactFormApi< +export interface ReactFormApi< TFormData, TFormValidator extends Validator | undefined = undefined, > {