File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
packages/common/src/wizard Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 11import { AnyObject } from "@data-driven-forms/react-form-renderer" ;
22
3- export type NextStep = string | ( ( values : AnyObject ) => string ) | AnyObject & {
3+ export type NextStepContext = {
4+ values : AnyObject ;
5+ }
6+
7+ export type NextStep = string | ( ( context : NextStepContext ) => string ) | ( ( context : NextStepContext ) => Promise < string > ) | AnyObject & {
48 stepMapper : {
59 [ key : string ] : string ;
610 [ key : number ] : string ;
711 } ;
812 when : string [ ] | string
913}
1014
11- declare const selectNext : ( nextStep : NextStep , getState : ( ( ) => AnyObject & { values : AnyObject } ) ) => string ;
15+ declare const selectNext : < T extends NextStep > ( nextStep : T , getState : ( ( ) => AnyObject & { values : AnyObject } ) ) => T extends ( ... args : any [ ] ) => infer U ? U : string ;
1216export default selectNext ;
You can’t perform that action at this time.
0 commit comments