MCPcopy Index your code
hub / github.com/tinyplex/tinybase / useDel

Function useDel

src/ui-solid/primitives.ts:379–398  ·  view source on GitHub ↗
(
  storeOrStoreId: MaybeAccessor<StoreOrStoreId | undefined>,
  deletable: string,
  then: (store: Store) => void = getUndefined,
  ...args: (
    MaybeAccessor<Id> | GetId<Parameter> | MaybeAccessor<boolean | undefined>
  )[]
)

Source from the content-addressed store, hash-verified

377 );
378
379const useDel = <Parameter>(
380 storeOrStoreId: MaybeAccessor<StoreOrStoreId | undefined>,
381 deletable: string,
382 then: (store: Store) => void = getUndefined,
383 ...args: (
384 MaybeAccessor<Id> | GetId<Parameter> | MaybeAccessor<boolean | undefined>
385 )[]
386): ParameterizedCallback<Parameter> => {
387 const store = useStoreOrStoreById(storeOrStoreId);
388 return (parameter?: Parameter) => {
389 const resolvedStore = getThing(store);
390 ifNotUndefined(resolvedStore, (store) =>
391 then(
392 (store as unknown as {[method: string]: (...args: unknown[]) => Store})[
393 DEL + deletable
394 ](...argsOrGetArgs(args, store, parameter)),
395 ),
396 );
397 };
398};
399
400const useCheckpointAction = (
401 checkpointsOrCheckpointsId: MaybeCheckpointsOrCheckpointsId | undefined,

Callers 6

useDelTablesCallbackFunction · 0.70
useDelTableCallbackFunction · 0.70
useDelRowCallbackFunction · 0.70
useDelCellCallbackFunction · 0.70
useDelValuesCallbackFunction · 0.70
useDelValueCallbackFunction · 0.70

Calls 3

useStoreOrStoreByIdFunction · 0.70
getThingFunction · 0.70
argsOrGetArgsFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…