Skip to content

Commit 9b4c42f

Browse files
danielnixonerikras
authored andcommitted
Slightly improve TypeScript types (#494)
1 parent 38b9b00 commit 9b4c42f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

typescript/index.d.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ export interface RenderableProps<T> {
5555
render?: (props: T) => React.ReactNode;
5656
}
5757

58-
export interface FormProps extends Config, RenderableProps<FormRenderProps> {
58+
export interface FormProps<FormData = object>
59+
extends Config<FormData>,
60+
RenderableProps<FormRenderProps> {
5961
subscription?: FormSubscription;
6062
decorators?: Decorator[];
6163
initialValuesEqual?: (a?: object, b?: object) => boolean;
@@ -96,7 +98,7 @@ export interface FormSpyProps
9698
RenderableProps<FormSpyRenderProps> {}
9799

98100
export const Field: React.FC<FieldProps<any>>;
99-
export const Form: React.FC<FormProps>;
101+
export const Form: React.FC<FormProps<object>>;
100102
export const FormSpy: React.FC<FormSpyProps>;
101103
export function useField<T extends HTMLElement>(
102104
name: string,

0 commit comments

Comments
 (0)