npm.io
1.1.6 • Published 1 year ago

@types/gulp-match

Licence
MIT
Version
1.1.6
Deps
2
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/gulp-match

Summary

This package contains type definitions for gulp-match (https://github.com/robrich/gulp-match).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/gulp-match.

index.d.ts

import vinyl = require("vinyl");
import minimatch = require("minimatch");

interface StatFilterCondition {
    isDirectory?: boolean | undefined;
    isFile?: boolean | undefined;
}

/**
 * Does a vinyl file match a condition? This function checks the condition on the file.path of the vinyl-fs file passed to it.
 *
 * Condition can be a boolean, a function, a regular expression, a glob string (or array of glob strings), or a stat filter object.
 */
declare function gulpMatch(file: vinyl, condition: gulpMatch.MatchCondition, options?: minimatch.IOptions): boolean;

declare namespace gulpMatch {
    type MatchCondition = boolean | ((fs: vinyl) => boolean) | RegExp | string | string[] | StatFilterCondition;
}

export = gulpMatch;

Additional Details

Credits

These definitions were written by Christophe Coevoet.