Files
DefinitelyTyped/types/empty-dir/index.d.ts
joshuaharry fa8825e60b 🤖 Merge PR #55887 [empty-dir] Adds support for arrays by @joshuaharry
* Adds support for arrays

* Applies suggestions

* Update types/empty-dir/empty-dir-tests.ts

Co-authored-by: Dimitri B. <BendingBender@users.noreply.github.com>

* Update types/empty-dir/index.d.ts

Co-authored-by: Dimitri B. <BendingBender@users.noreply.github.com>

Co-authored-by: Dimitri B. <BendingBender@users.noreply.github.com>
2021-09-28 10:03:06 -07:00

28 lines
900 B
TypeScript

// Type definitions for empty-dir 2.0
// Project: https://github.com/gulpjs/empty-dir
// Definitions by: BendingBender <https://github.com/BendingBender>
// Daniel Cassidy <https://github.com/djcsdy>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
export = emptyDir;
declare function emptyDir(
dir: string | readonly string[],
cb: (err: NodeJS.ErrnoException, isEmpty: boolean) => void
): void;
declare function emptyDir(
dir: string | readonly string[],
filter: (path: string) => boolean,
cb: (err: NodeJS.ErrnoException, isEmpty: boolean) => void
): void;
declare function emptyDir(
dir: string | readonly string[],
filter?: (path: string) => boolean
): Promise<boolean>;
declare namespace emptyDir {
function sync(dir: string | readonly string[], filter?: (path: string) => boolean): boolean;
}