Added | null to error types in callbacks (#20265)

I'm guessing these haven't been updated since strictness was introduced.
This commit is contained in:
Josh Goldberg
2017-10-04 09:23:08 -04:00
committed by Masahiro Wakame
parent 390670c0a7
commit a3f56c28fa

View File

@@ -11,8 +11,8 @@ import events = require("events");
import fs = require('fs');
import minimatch = require("minimatch");
declare function G(pattern: string, cb: (err: Error, matches: string[]) => void): void;
declare function G(pattern: string, options: G.IOptions, cb: (err: Error, matches: string[]) => void): void;
declare function G(pattern: string, cb: (err: Error | null, matches: string[]) => void): void;
declare function G(pattern: string, options: G.IOptions, cb: (err: Error | null, matches: string[]) => void): void;
declare namespace G {
function sync(pattern: string, options?: IOptions): string[];
@@ -57,8 +57,8 @@ declare namespace G {
}
interface IGlobStatic extends events.EventEmitter {
new (pattern: string, cb?: (err: Error, matches: string[]) => void): IGlob;
new (pattern: string, options: IOptions, cb?: (err: Error, matches: string[]) => void): IGlob;
new (pattern: string, cb?: (err: Error | null, matches: string[]) => void): IGlob;
new (pattern: string, options: IOptions, cb?: (err: Error | null, matches: string[]) => void): IGlob;
prototype: IGlob;
}