@@ -86,7 +86,6 @@ import debounce from 'lodash/debounce';
8686import React , {
8787 ComponentType ,
8888 Dispatch ,
89- ReducerAction ,
9089 useCallback ,
9190 useContext ,
9291 useEffect ,
@@ -107,7 +106,7 @@ const initialCoreState: JsonFormsCore = {
107106} ;
108107
109108export interface JsonFormsStateContext extends JsonFormsSubStates {
110- dispatch ?: Dispatch < ReducerAction < typeof coreReducer > > ;
109+ dispatch ?: Dispatch < CoreActions > ;
111110}
112111
113112export const JsonFormsContext = React . createContext < JsonFormsStateContext > ( {
@@ -276,7 +275,7 @@ export const useJsonForms = (): JsonFormsStateContext =>
276275
277276export interface JsonFormsReduxContextProps extends JsonFormsSubStates {
278277 children : any ;
279- dispatch : Dispatch < ReducerAction < any > > ;
278+ dispatch : Dispatch < CoreActions > ;
280279}
281280
282281export const ctxToArrayLayoutProps = (
@@ -373,7 +372,7 @@ export const ctxToAllOfProps = (
373372} ;
374373
375374export const ctxDispatchToControlProps = (
376- dispatch : Dispatch < ReducerAction < any > >
375+ dispatch : Dispatch < CoreActions >
377376) : DispatchPropsOfControl =>
378377 useMemo ( ( ) => mapDispatchToControlProps ( dispatch as any ) , [ dispatch ] ) ;
379378
@@ -409,7 +408,7 @@ export const ctxToJsonFormsRendererProps = (
409408) => mapStateToJsonFormsRendererProps ( { jsonforms : { ...ctx } } , ownProps ) ;
410409
411410export const ctxDispatchToArrayControlProps = (
412- dispatch : Dispatch < ReducerAction < any > >
411+ dispatch : Dispatch < CoreActions >
413412) => ( {
414413 ...ctxDispatchToControlProps ( dispatch ) ,
415414 ...useMemo ( ( ) => mapDispatchToArrayControlProps ( dispatch as any ) , [ dispatch ] ) ,
@@ -473,7 +472,7 @@ export const ctxToDispatchCellProps = (
473472} ;
474473
475474export const ctxDispatchToMultiEnumProps = (
476- dispatch : Dispatch < ReducerAction < any > >
475+ dispatch : Dispatch < CoreActions >
477476) => ( {
478477 ...ctxDispatchToControlProps ( dispatch ) ,
479478 ...useMemo ( ( ) => mapDispatchToMultiEnumProps ( dispatch as any ) , [ dispatch ] ) ,
0 commit comments