( storeOrStoreId: StoreOrStoreId | undefined, deletable: string, then: (store: Store) => void = getUndefined, thenDeps: DependencyList = EMPTY_ARRAY, ...args: (Id | GetId<Parameter> | boolean | undefined)[] )
| 547 | ) => arrayFilter(args, (arg) => !isFunction(arg)); |
| 548 | |
| 549 | const useDel = <Parameter>( |
| 550 | storeOrStoreId: StoreOrStoreId | undefined, |
| 551 | deletable: string, |
| 552 | then: (store: Store) => void = getUndefined, |
| 553 | thenDeps: DependencyList = EMPTY_ARRAY, |
| 554 | ...args: (Id | GetId<Parameter> | boolean | undefined)[] |
| 555 | ): ParameterizedCallback<Parameter> => { |
| 556 | const store: any = useStoreOrStoreById(storeOrStoreId); |
| 557 | return useCallback( |
| 558 | (parameter?: Parameter) => |
| 559 | then(store?.[DEL + deletable](...argsOrGetArgs(args, store, parameter))), |
| 560 | // eslint-disable-next-line react-hooks/exhaustive-deps |
| 561 | [store, deletable, ...thenDeps, ...nonFunctionDeps(args)], |
| 562 | ); |
| 563 | }; |
| 564 | |
| 565 | const useCheckpointAction = ( |
| 566 | checkpointsOrCheckpointsId: CheckpointsOrCheckpointsId | undefined, |
no test coverage detected
searching dependent graphs…