From c313dca7d1cfa4ae38702e6441302ca95e4eade8 Mon Sep 17 00:00:00 2001 From: Denis Malinochkin Date: Thu, 26 Sep 2019 21:43:21 +0300 Subject: [PATCH] Update types for `glob-parent` to version `5.1` (#38521) --- types/glob-parent/glob-parent-tests.ts | 7 +++++++ types/glob-parent/index.d.ts | 10 ++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/types/glob-parent/glob-parent-tests.ts b/types/glob-parent/glob-parent-tests.ts index 13c7df5d59..8cf5a20da0 100644 --- a/types/glob-parent/glob-parent-tests.ts +++ b/types/glob-parent/glob-parent-tests.ts @@ -2,3 +2,10 @@ import globParent = require('glob-parent'); // $ExpectType string globParent('*.js'); + +globParent('*.js', {}); +globParent('*.js', { flipBackslashes: false }); + +const options: globParent.Options = { + flipBackslashes: false +}; diff --git a/types/glob-parent/index.d.ts b/types/glob-parent/index.d.ts index b41cc48c31..a4a4bb8659 100644 --- a/types/glob-parent/index.d.ts +++ b/types/glob-parent/index.d.ts @@ -1,8 +1,14 @@ -// Type definitions for glob-parent 3.1 +// Type definitions for glob-parent 5.1 // Project: https://github.com/gulpjs/glob-parent // Definitions by: mrmlnc // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare function globParent(pattern: string): string; +declare function globParent(pattern: string, options?: globParent.Options): string; + +declare namespace globParent { + interface Options { + flipBackslashes?: boolean; + } +} export = globParent;