ipfs-repo
Version:
IPFS Repo implementation
28 lines • 1.17 kB
TypeScript
/**
* @typedef {import('interface-blockstore').Blockstore} Blockstore
* @typedef {import('./types').loadCodec} loadCodec
* @typedef {import('./types').GCErrorResult} GCErrorResult
* @typedef {import('./types').GCSuccessResult} GCSuccessResult
*/
/**
* Perform mark and sweep garbage collection
*
* @param {object} config
* @param {import('./types').GCLock} config.gcLock
* @param {import('./types').Pins} config.pins
* @param {Blockstore} config.blockstore
* @param {import('interface-datastore').Datastore} config.root
* @param {loadCodec} config.loadCodec
*/
export function gc({ gcLock, pins, blockstore, root, loadCodec }: {
gcLock: import('./types').GCLock;
pins: import('./types').Pins;
blockstore: Blockstore;
root: import('interface-datastore').Datastore;
loadCodec: loadCodec;
}): () => AsyncGenerator<GCErrorResult | GCSuccessResult, void, unknown>;
export type Blockstore = import('interface-blockstore').Blockstore;
export type loadCodec = import('./types').loadCodec;
export type GCErrorResult = import('./types').GCErrorResult;
export type GCSuccessResult = import('./types').GCSuccessResult;
//# sourceMappingURL=gc.d.ts.map