( getCheckpointId: (parameter: Parameter) => Id, checkpointsOrCheckpointsId?: MaybeCheckpointsOrCheckpointsId, then: (checkpoints: Checkpoints, checkpointId: Id) => void = getUndefined, )
| 1850 | ): Callback => useCheckpointAction(checkpointsOrCheckpointsId, 'goForward'); |
| 1851 | |
| 1852 | export const useGoToCallback = <Parameter>( |
| 1853 | getCheckpointId: (parameter: Parameter) => Id, |
| 1854 | checkpointsOrCheckpointsId?: MaybeCheckpointsOrCheckpointsId, |
| 1855 | then: (checkpoints: Checkpoints, checkpointId: Id) => void = getUndefined, |
| 1856 | ): ParameterizedCallback<Parameter> => { |
| 1857 | const checkpoints = useCheckpointsOrCheckpointsById( |
| 1858 | checkpointsOrCheckpointsId, |
| 1859 | ); |
| 1860 | return (parameter) => |
| 1861 | ifNotUndefined(getThing(checkpoints), (resolvedCheckpoints) => |
| 1862 | ifNotUndefined( |
| 1863 | getCheckpointId(parameter as Parameter), |
| 1864 | (checkpointId: Id) => |
| 1865 | then(resolvedCheckpoints.goTo(checkpointId), checkpointId), |
| 1866 | ), |
| 1867 | ); |
| 1868 | }; |
| 1869 | |
| 1870 | export const useUndoInformation = ( |
| 1871 | checkpointsOrCheckpointsId?: MaybeCheckpointsOrCheckpointsId, |
no test coverage detected
searching dependent graphs…