mirror of
https://github.com/chenasraf/DefinitelyTyped.git
synced 2026-05-18 01:49:01 +00:00
* 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>
28 lines
900 B
TypeScript
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;
|
|
}
|