File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ import {
1313 FieldHelperProps ,
1414 FieldInputProps ,
1515 FormikHelpers ,
16- FormikContextType ,
1716} from './types' ;
1817import {
1918 isFunction ,
@@ -138,7 +137,7 @@ export function useFormik<Values extends FormikValues = FormikValues>({
138137 enableReinitialize = false ,
139138 onSubmit,
140139 ...rest
141- } : FormikConfig < Values > ) {
140+ } : FormikConfig < Values > ) : FormikProps < Values > {
142141 const props = {
143142 validateOnChange,
144143 validateOnBlur,
@@ -998,7 +997,7 @@ export function useFormik<Values extends FormikValues = FormikValues>({
998997export const Formik = React . forwardRef ( <
999998 Values extends FormikValues = FormikValues ,
1000999 ExtraProps = { }
1001- > ( props : FormikConfig < Values > & ExtraProps , ref : React . Ref < FormikContextType < Values > > ) => {
1000+ > ( props : FormikConfig < Values > & ExtraProps , ref : React . Ref < FormikProps < Values > > ) => {
10021001 const formikbag = useFormik < Values > ( props ) ;
10031002 const { component, children, render, innerRef } = props ;
10041003
@@ -1035,7 +1034,7 @@ export const Formik = React.forwardRef(<
10351034} ) as <
10361035 Values extends FormikValues = FormikValues ,
10371036 ExtraProps = { }
1038- > ( props : FormikConfig < Values > & ExtraProps & React . RefAttributes < FormikContextType < Values > > ) => JSX . Element ;
1037+ > ( props : FormikConfig < Values > & ExtraProps & React . RefAttributes < FormikProps < Values > > ) => JSX . Element ;
10391038
10401039function warnAboutMissingIdentifier ( {
10411040 htmlContent,
Original file line number Diff line number Diff line change 11import * as React from 'react' ;
22import { render , fireEvent , wait } from 'react-testing-library' ;
3- import { FormikContextType } from '../src/types' ;
43import * as Yup from 'yup' ;
54
65import {
@@ -51,7 +50,7 @@ function Form({
5150
5251const InitialValues = { name : 'jared' } ;
5352
54- function renderFormik < V = Values > ( props ?: Partial < FormikConfig < V > > & React . RefAttributes < FormikContextType < V > > ) {
53+ function renderFormik < V = Values > ( props ?: Partial < FormikConfig < V > > & React . RefAttributes < FormikProps < V > > ) {
5554 let injected : any ;
5655 const { rerender, ...rest } = render (
5756 < Formik
@@ -1299,7 +1298,7 @@ describe('<Formik>', () => {
12991298 } ) ;
13001299
13011300 it ( 'exposes formikbag with forwardRef' , ( ) => {
1302- const ref = React . createRef < FormikContextType < Values > > ( ) ;
1301+ const ref = React . createRef < FormikProps < Values > > ( ) ;
13031302
13041303 const { getProps } = renderFormik ( { ref } ) ;
13051304
You can’t perform that action at this time.
0 commit comments