TinyBase logoTinyBase


The IndexCallback type describes a function that takes an Index's Id and a callback to loop over each Slice within it.

  indexId: Id,
  forEachSlice: (sliceCallback: SliceCallback) => void,
): void

The Id of the Index that the callback can operate on.

forEachSlice(sliceCallback: SliceCallback) => void

This has no return value.

A IndexCallback is provided when using the forEachIndex method, so that you can do something based on every Index in the Indexes object. See that method for specific examples.