Skip to content

Commit a29f858

Browse files
author
Kridsakorn
committed
fix issue #3455
1 parent 2618cc4 commit a29f858

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changeset/mean-deers-repeat.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'formik': major
3+
---
4+
5+
fix issue #3455

packages/formik/src/types.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ export type FormikErrors<Values> = {
2727
export type FormikTouched<Values> = {
2828
[K in keyof Values]?: Values[K] extends any[]
2929
? Values[K][number] extends object // [number] is the special sauce to get the type of array's element. More here https://github.com/Microsoft/TypeScript/pull/21316
30-
? FormikTouched<Values[K][number]>[]
31-
: boolean
30+
? FormikTouched<Values[K][number]>[] | boolean | boolean[]
31+
: boolean | boolean[]
3232
: Values[K] extends object
3333
? FormikTouched<Values[K]>
3434
: boolean;

0 commit comments

Comments
 (0)