DefinitelyTyped/types/du/index.d.ts
Richie Bendall e0b072e8e8 feat: Add typings for du (#41823)
* feat: Add typings for du

Signed-off-by: Richie Bendall <richiebendall@gmail.com>

* chore: Remove boilerplate line

Signed-off-by: Richie Bendall <richiebendall@gmail.com>
2020-01-24 16:46:40 -08:00

16 lines
585 B
TypeScript

// Type definitions for du 1.0
// Project: https://github.com/rvagg/node-du#readme
// Definitions by: Richie Bendall <https://github.com/Richienb>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface Options {
disk?: boolean;
filter?: (dir: string) => boolean;
}
declare function du(dir: string, options?: Options): Promise<number>;
declare function du(dir: string, options: Options, callback: (err: Error | null, data?: number) => any): void;
declare function du(dir: string, callback: (err: Error | null, data?: number) => any): void;
export = du;