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

2.0.4 • Public • Published

Installation

npm install --save @types/bash-glob

Summary

This package contains type definitions for bash-glob (https://github.com/micromatch/bash-glob).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/bash-glob.

index.d.ts

type Patterns = string | string[];
type Callback = (err: Error, files: string[]) => void;

declare function bashGlob(pattern: Patterns, callback: Callback): void;
declare function bashGlob(pattern: Patterns, options: bashGlob.Options, callback: Callback): void;

declare namespace bashGlob {
    interface Options {
        cwd?: string | undefined;
        dot?: boolean | undefined;
        dotglob?: boolean | undefined;
        extglob?: boolean | undefined;
        failglob?: boolean | undefined;
        globstar?: boolean | undefined;
        nocase?: boolean | undefined;
        nocaseglob?: boolean | undefined;
        nullglob?: boolean | undefined;
    }

    function on(event: "match" | "files", callback: (files: string, cwd: string) => void): void;
    function on(event: "end", callback: (files: string) => void): void;

    function each(patterns: Patterns, callback: Callback): void;
    function each(patterns: Patterns, options: Options, callback: Callback): void;

    function promise(patterns: Patterns, options?: Options): Promise<string[]>;

    function sync(patterns: Patterns, options?: Options): string[];
}

export = bashGlob;

Additional Details

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

Credits

These definitions were written by mrmlnc.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/bash-glob

Weekly Downloads

53

Version

2.0.4

License

MIT

Unpacked Size

4.84 kB

Total Files

5

Last publish

Collaborators

  • types