vitepress-jsdoc
Version:
A bridge between Vitepress and JSDoc-style commented codebases for hassle-free documentation.
42 lines • 1.44 kB
TypeScript
import { type PathRemover } from '../interfaces.js';
/**
* Implementation of the `PathRemover` interface using the `rimraf` module.
* This class provides methods to delete specified paths and retrieve the list of deleted paths.
*
* @class
* @implements {PathRemover}
*
* @example
*
* const remover = new RimrafPathRemover();
* const pathsToDelete = ['./docs', '**\/*.tmp']; // remove backslash
* const success = await remover.delete(pathsToDelete);
* if (success) {
* const deletedPaths = remover.getDeletedPaths();
* }
*/
export declare class RimrafPathRemover implements PathRemover {
private readonly deletedPaths;
/**
* Deletes the specified paths.
*
* @param {string[]} paths - An array of paths or glob patterns to be deleted.
* @returns {Promise<boolean>} A promise that resolves with a boolean indicating whether all paths were successfully deleted.
*/
delete(paths: string[]): Promise<boolean>;
/**
* Retrieves the list of paths that were deleted.
*
* @returns {string[]} An array of paths that were deleted.
*/
getDeletedPaths(): string[];
/**
* Captures the path of a deleted entry.
*
* @private
* @param {string} path - The path of the deleted entry.
* @returns {boolean} Always returns true to proceed with the deletion.
*/
private captureDeletedPaths;
}
//# sourceMappingURL=rimraf-path-remover.d.ts.map