@types/delete-empty
TypeScript icon, indicating that this package has built-in type declarations

3.0.4 • Public • Published

Installation

npm install --save @types/delete-empty

Summary

This package contains type definitions for delete-empty (https://github.com/jonschlinkert/delete-empty).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/delete-empty.

index.d.ts

declare function deleteEmpty(dir: string, options: deleteEmpty.Options, cb: deleteEmpty.DeleteEmptyCallback): void;
declare function deleteEmpty(dir: string, cb: deleteEmpty.DeleteEmptyCallback): void;
declare function deleteEmpty(dir: string, options?: deleteEmpty.Options): Promise<string[]>;

declare namespace deleteEmpty {
    function sync(dir: string, options?: Options): string[];

    interface DeleteEmptyCallback {
        (err: Error | undefined | null, deleted: string[]): void;
    }

    interface Options {
        /**
         * Do a dry run without deleting any files
         * @default false
         */
        dryRun?: boolean | undefined;
        filter?: FilterFunction | undefined;
        junkRegex?: RegExp | undefined;
    }

    interface FilterFunction {
        (file: string, regex: RegExp): string;
    }
}

export = deleteEmpty;

Additional Details

  • Last updated: Mon, 06 Nov 2023 22:41:05 GMT
  • Dependencies: none

Credits

These definitions were written by Alorel, and Piotr Błażejewicz.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/delete-empty

Weekly Downloads

15,441

Version

3.0.4

License

MIT

Unpacked Size

4.48 kB

Total Files

5

Last publish

Collaborators

  • types