diff --git a/index.d.ts b/index.d.ts index 0f46c07..b9571a6 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,3 +1,4 @@ +import {URL} from 'node:url'; // TODO: Remove this when https://github.com/DefinitelyTyped/DefinitelyTyped/issues/34960 is fixed. import {Options as FastGlobOptions, Entry} from 'fast-glob'; export type GlobEntry = Entry; diff --git a/index.test-d.ts b/index.test-d.ts index 21c1632..c3b0c86 100644 --- a/index.test-d.ts +++ b/index.test-d.ts @@ -1,4 +1,5 @@ import {Buffer} from 'node:buffer'; +import {URL} from 'node:url'; import {expectType} from 'tsd'; import { GlobTask, @@ -104,6 +105,8 @@ expectType(generateGlobTasks('*.tmp', {ignore: ['**/b.tmp']})); expectType(isDynamicPattern('**')); expectType(isDynamicPattern(['**', 'path1', 'path2'])); expectType(isDynamicPattern(['**', 'path1', 'path2'], {extglob: false})); +expectType(isDynamicPattern(['**'], {cwd: new URL('https://example.com')})); +expectType(isDynamicPattern(['**'], {cwd: __dirname})); // IsGitIgnored expectType>(isGitIgnored());