Skip to content

Commit c33a14d

Browse files
authored
We fixed formik :D (microsoft#21660)
1 parent 17554ff commit c33a14d

File tree

3 files changed

+3
-31
lines changed

3 files changed

+3
-31
lines changed

tests/baselines/reference/user/chrome-devtools-frontend.log

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ Standard output:
1212
../../../../built/local/lib.dom.d.ts(9264,13): error TS2300: Duplicate identifier 'Request'.
1313
../../../../built/local/lib.dom.d.ts(13522,11): error TS2300: Duplicate identifier 'Window'.
1414
../../../../built/local/lib.dom.d.ts(13711,13): error TS2300: Duplicate identifier 'Window'.
15-
../../../../built/local/lib.es5.d.ts(1321,11): error TS2300: Duplicate identifier 'ArrayLike'.
16-
../../../../built/local/lib.es5.d.ts(1350,6): error TS2300: Duplicate identifier 'Record'.
15+
../../../../built/local/lib.es5.d.ts(1328,11): error TS2300: Duplicate identifier 'ArrayLike'.
16+
../../../../built/local/lib.es5.d.ts(1357,6): error TS2300: Duplicate identifier 'Record'.
1717
../../../../node_modules/@types/node/index.d.ts(150,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'module' must be of type '{ [x: string]: any; }', but here has type 'NodeModule'.
1818
node_modules/chrome-devtools-frontend/front_end/Runtime.js(43,8): error TS2339: Property '_importScriptPathPrefix' does not exist on type 'Window'.
1919
node_modules/chrome-devtools-frontend/front_end/Runtime.js(95,28): error TS2339: Property 'response' does not exist on type 'EventTarget'.

tests/baselines/reference/user/formik.log

Lines changed: 0 additions & 28 deletions
This file was deleted.

tests/cases/user/formik/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const Basic = () => (
2929
}}
3030
validate={values => {
3131
// same as above, but feel free to move this into a class method now.
32-
let errors: FormikErrors<MyData> = {};
32+
let errors: FormikErrors<MyData> = {} as FormikErrors<MyData>; // FormikErrors<MyData> isn't optionalized, so in strict null checks this needs a cast
3333
if (!values.email) {
3434
errors.email = 'Required';
3535
} else if (

0 commit comments

Comments
 (0)