DefinitelyTyped/types/empty-dir/index.d.ts
2018-12-06 19:07:31 +01:00

23 lines
657 B
TypeScript

// Type definitions for empty-dir 1.0
// Project: https://github.com/js-cli/js-empty-dir
// Definitions by: BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
export = emptyDir;
declare function emptyDir(
dir: string,
cb: (err: NodeJS.ErrnoException, isEmpty: boolean) => void
): void;
declare function emptyDir(
dir: string,
filter: (path: string) => boolean,
cb: (err: NodeJS.ErrnoException, isEmpty: boolean) => void
): void;
declare namespace emptyDir {
function sync(dir: string, filter?: (path: string) => boolean): boolean;
}