MCPcopy
hub / github.com/tinyplex/tinybase / Callback

Function Callback

test/unit/core/ui-solid/primitives.test.ts:642–660  ·  view source on GitHub ↗
({
  mode,
  checkpoints,
}: {
  readonly mode: string;
  readonly checkpoints: Checkpoints;
})

Source from the content-addressed store, hash-verified

640};
641
642const Callback = ({
643 mode,
644 checkpoints,
645}: {
646 readonly mode: string;
647 readonly checkpoints: Checkpoints;
648}) => {
649 const goBackward = useGoBackwardCallback(checkpoints);
650 const goForward = useGoForwardCallback(checkpoints);
651 return (() => {
652 const button = document.createElement('button');
653 button.textContent = 'Go';
654 button.addEventListener(
655 'click',
656 mode == 'goBackward' ? goBackward : goForward,
657 );
658 return button;
659 }) as unknown as JSXElement;
660};
661
662const CheckpointInfo = ({
663 mode,

Callers

nothing calls this directly

Calls 3

useGoBackwardCallbackFunction · 0.90
useGoForwardCallbackFunction · 0.90
addEventListenerMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…