@@ -21,6 +21,7 @@ import {
2121 CellIdsListener ,
2222 CellListener ,
2323 MapCell ,
24+ MapValue ,
2425 Row ,
2526 RowIdsListener ,
2627 RowListener ,
@@ -235,21 +236,21 @@ const useListener = (
235236 // eslint-disable-next-line react-hooks/exhaustive-deps
236237 } , [ thing , ...preArgs , ...listenerDeps , ...postArgs ] ) ;
237238
238- const useSetCallback = < Parameter , Value > (
239+ const useSetCallback = < Parameter , Thing > (
239240 storeOrStoreId : StoreOrStoreId | undefined ,
240241 settable : string ,
241- get : ( parameter : Parameter , store : Store ) => Value ,
242+ get : ( parameter : Parameter , store : Store ) => Thing ,
242243 getDeps : React . DependencyList = [ ] ,
243- then : ( store : Store , value : Value ) => void = getUndefined ,
244+ then : ( store : Store , thing : Thing ) => void = getUndefined ,
244245 thenDeps : React . DependencyList = [ ] ,
245246 ...args : Ids
246247) : ParameterizedCallback < Parameter > => {
247248 const store = useStoreOrStoreId ( storeOrStoreId ) ;
248249 return useCallback (
249250 ( parameter ) =>
250251 ifNotUndefined ( store , ( store : any ) =>
251- ifNotUndefined ( get ( parameter as any , store ) , ( value : Value ) =>
252- then ( store [ 'set' + settable ] ( ...args , value ) , value ) ,
252+ ifNotUndefined ( get ( parameter as any , store ) , ( thing : Thing ) =>
253+ then ( store [ 'set' + settable ] ( ...args , thing ) , thing ) ,
253254 ) ,
254255 ) ,
255256 // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -534,10 +535,10 @@ export const useSetPartialValuesCallback: typeof useSetPartialValuesCallbackDecl
534535
535536export const useSetValueCallback : typeof useSetValueCallbackDecl = < Parameter > (
536537 valueId : Id ,
537- getValue : ( parameter : Parameter , store : Store ) => Value ,
538+ getValue : ( parameter : Parameter , store : Store ) => Value | MapValue ,
538539 getValueDeps ?: React . DependencyList ,
539540 storeOrStoreId ?: StoreOrStoreId ,
540- then ?: ( store : Store , value : Value ) => void ,
541+ then ?: ( store : Store , value : Value | MapValue ) => void ,
541542 thenDeps ?: React . DependencyList ,
542543) : ParameterizedCallback < Parameter > =>
543544 useSetCallback (
0 commit comments