File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -16,11 +16,13 @@ describe('formOptions', () => {
16
16
} as Person ,
17
17
} )
18
18
19
- const form = new FormApi ( {
19
+ const form1 = new FormApi ( formOpts )
20
+ const form2 = new FormApi ( {
20
21
...formOpts ,
21
22
} )
22
23
23
- expectTypeOf ( form . state . values ) . toEqualTypeOf < Person > ( )
24
+ expectTypeOf ( form1 . state . values ) . toEqualTypeOf < Person > ( )
25
+ expectTypeOf ( form2 . state . values ) . toEqualTypeOf < Person > ( )
24
26
} )
25
27
26
28
it ( 'types should be properly inferred when passing args alongside formOptions' , ( ) => {
@@ -66,6 +68,9 @@ describe('formOptions', () => {
66
68
} as Person ,
67
69
} )
68
70
71
+ const formOnly = new FormApi ( formOpts )
72
+ expectTypeOf ( formOnly . state . values ) . toEqualTypeOf < Person > ( )
73
+
69
74
const form = new FormApi ( {
70
75
...formOpts ,
71
76
defaultValues : {
@@ -95,6 +100,9 @@ describe('formOptions', () => {
95
100
expectTypeOf ( meta ) . toEqualTypeOf < SubmitMeta > ( )
96
101
} ,
97
102
} )
103
+
104
+ const form = new FormApi ( formOpts )
105
+ const form2 = new FormApi ( { ...formOpts } )
98
106
} )
99
107
100
108
it ( 'types should infer validator types' , ( ) => {
You can’t perform that action at this time.
0 commit comments