All files / core/src/types VolumeLoaderFn.ts

0% Statements 0/0
0% Branches 0/0
0% Functions 0/0
0% Lines 0/0

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21                                         
import type IImageVolume from './IImageVolume';
 
/**
 * Any volumeLoader function should implement a loading given the volumeId
 * and returns a mandatory promise which will resolve to the loaded volume object.
 * Additional `cancelFn` and `decache` can be implemented.
 */
type VolumeLoaderFn = (
  volumeId: string,
  options?: Record<string, unknown>
) => {
  /** promise that resolves to the volume object */
  promise: Promise<IImageVolume>;
  /** cancel function */
  cancelFn?: () => void | undefined;
  /** decache function */
  decache?: () => void | undefined;
};
 
export type { VolumeLoaderFn as default };