UNPKG

883 BTypeScriptView Raw
1// Type definitions for gulp-filter v3.0.1
2// Project: https://github.com/sindresorhus/gulp-filter
3// Definitions by: Tanguy Krotoff <https://github.com/tkrotoff>
4// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5// TypeScript Version: 2.2
6
7/// <reference types="node" />
8
9import File = require('vinyl');
10import * as Minimatch from 'minimatch';
11
12declare namespace filter {
13 interface FileFunction {
14 (file: File): boolean;
15 }
16
17 interface Options extends Minimatch.IOptions {
18 restore?: boolean | undefined;
19 passthrough?: boolean | undefined;
20 }
21
22 // A transform stream with a .restore object
23 interface Filter extends NodeJS.ReadWriteStream {
24 restore: NodeJS.ReadWriteStream
25 }
26}
27
28declare function filter(pattern: string | string[] | filter.FileFunction, options?: filter.Options): filter.Filter;
29
30export = filter;