diff --git a/types/glob/glob-tests.ts b/types/glob/glob-tests.ts index e67e41317b..c73ac10815 100644 --- a/types/glob/glob-tests.ts +++ b/types/glob/glob-tests.ts @@ -29,5 +29,6 @@ const Glob = glob.Glob; console.log("after"); })(); +declare const ignore: ReadonlyArray; glob.sync('/foo/*', {realpath: true, realpathCache: {'/foo/bar': '/bar'}, ignore: '/foo/baz'}); -glob.sync('/*', {nodir: true, cache: {'/': ['bar', 'baz']}, statCache: {'/foo/bar': false, '/foo/baz': {isDirectory() { return true; }}}}); +glob.sync('/*', {ignore, nodir: true, cache: {'/': ['bar', 'baz']}, statCache: {'/foo/bar': false, '/foo/baz': {isDirectory() { return true; }}}}); diff --git a/types/glob/index.d.ts b/types/glob/index.d.ts index 9b0e1e5cb8..fc8c98853d 100644 --- a/types/glob/index.d.ts +++ b/types/glob/index.d.ts @@ -33,7 +33,7 @@ declare namespace G { stat?: boolean; silent?: boolean; strict?: boolean; - cache?: { [path: string]: boolean | 'DIR' | 'FILE' | string[] }; + cache?: { [path: string]: boolean | 'DIR' | 'FILE' | ReadonlyArray }; statCache?: { [path: string]: false | { isDirectory(): boolean} | undefined }; symlinks?: { [path: string]: boolean | undefined }; realpathCache?: { [path: string]: string }; @@ -47,7 +47,7 @@ declare namespace G { nocase?: boolean; matchBase?: any; nodir?: boolean; - ignore?: string | string[]; + ignore?: string | ReadonlyArray; follow?: boolean; realpath?: boolean; nonegate?: boolean; @@ -70,7 +70,7 @@ declare namespace G { minimatch: minimatch.IMinimatch; options: IOptions; aborted: boolean; - cache: { [path: string]: boolean | 'DIR' | 'FILE' | string[] }; + cache: { [path: string]: boolean | 'DIR' | 'FILE' | ReadonlyArray }; statCache: { [path: string]: false | { isDirectory(): boolean; } | undefined }; symlinks: { [path: string]: boolean | undefined }; realpathCache: { [path: string]: string };