Skip to content

Commit 7acdb48

Browse files
committed
Merge pull request DefinitelyTyped#4232 from jedmao/fix-vinyl-fs
Fix vinyl-fs defs
2 parents 4311017 + 298a4d1 commit 7acdb48

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

vinyl-fs/vinyl-fs.d.ts

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,20 @@
88

99
declare module NodeJS {
1010
interface WritableStream {
11-
write(buffer: any/* Vinyl.IFile */, cb?: Function): boolean;
11+
write(buffer: any/* Vinyl.File */, cb?: Function): boolean;
1212
}
1313
}
1414

1515
declare module "vinyl-fs" {
1616
import _events = require("events");
17+
import File = require("vinyl");
1718

18-
function src(globs:string, opt?:{read?:boolean;buffer?:boolean;}):NodeJS.ReadWriteStream;
19+
function src(globs:string|string[], opt?:{read?:boolean;buffer?:boolean;}):NodeJS.ReadWriteStream;
1920

20-
function src(globs:string[], opt?:{read?:boolean;buffer?:boolean;}):NodeJS.ReadWriteStream;
21+
function watch(globs:string|string[], cb?:(outEvt:{type:any;path:any;old:any;})=>void):_events.EventEmitter;
2122

22-
function watch(globs:string, cb?:(outEvt:{type:any;path:any;old:any;})=>void):_events.EventEmitter;
23+
function watch(globs:string|string[], opt?:{interval?:number;debounceDelay?:number;cwd?:string;maxListeners?:Function;}, cb?:(outEvt:{type:any;path:any;old:any;})=>void):_events.EventEmitter;
2324

24-
function watch(globs:string[], cb?:(outEvt:{type:any;path:any;old:any;})=>void):_events.EventEmitter;
25-
26-
function watch(globs:string, opt?:{interval?:number;debounceDelay?:number;cwd?:string;maxListeners?:Function;}, cb?:(outEvt:{type:any;path:any;old:any;})=>void):_events.EventEmitter;
27-
28-
function watch(globs:string[], opt?:{interval?:number;debounceDelay?:number;cwd?:string;maxListeners?:Function;}, cb?:(outEvt:{type:any;path:any;old:any;})=>void):_events.EventEmitter;
29-
30-
function dest(folder:string, opt?:{cwd?:string; mode?:any/* number or string */;}):NodeJS.ReadWriteStream;
25+
function dest(folder: string, opt?: { cwd?: string; mode?: number|string; }): NodeJS.ReadWriteStream;
26+
function dest(getFolderPath: (file: File) => string): NodeJS.ReadWriteStream;
3127
}

0 commit comments

Comments
 (0)