From a3f56c28fa6720620c0fccbaa3618bb59c947d26 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Wed, 4 Oct 2017 09:23:08 -0400 Subject: [PATCH] Added | null to error types in callbacks (#20265) I'm guessing these haven't been updated since strictness was introduced. --- types/glob/index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/types/glob/index.d.ts b/types/glob/index.d.ts index 6687c79570..c7c6ffc601 100644 --- a/types/glob/index.d.ts +++ b/types/glob/index.d.ts @@ -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; }