|
1 |
| -import {Options as FastGlobOptions} from 'fast-glob'; |
| 1 | +import {Options as FastGlobOptions, Entry as FastGlobEntry} from 'fast-glob'; |
2 | 2 |
|
3 | 3 | declare namespace globby {
|
4 | 4 | type ExpandDirectoriesOption =
|
5 | 5 | | boolean
|
6 | 6 | | readonly string[]
|
7 | 7 | | {files?: readonly string[]; extensions?: readonly string[]};
|
8 | 8 |
|
| 9 | + type Entry = FastGlobEntry; |
| 10 | + |
9 | 11 | interface GlobbyOptions extends FastGlobOptions {
|
10 | 12 | /**
|
11 | 13 | If set to `true`, `globby` will automatically glob directories for you. If you define an `Array` it will only glob files that matches the patterns inside the `Array`. You can also define an `Object` with `files` and `extensions` like in the example below.
|
@@ -88,10 +90,13 @@ declare const globby: {
|
88 | 90 | @param options - See the [`fast-glob` options](https://github.com/mrmlnc/fast-glob#options-3) in addition to the ones in this package.
|
89 | 91 | @returns The matching paths.
|
90 | 92 | */
|
91 |
| - sync: ( |
| 93 | + sync: (( |
| 94 | + patterns: string | readonly string[], |
| 95 | + options: globby.GlobbyOptions & {objectMode: true} |
| 96 | + ) => globby.Entry[]) & (( |
92 | 97 | patterns: string | readonly string[],
|
93 | 98 | options?: globby.GlobbyOptions
|
94 |
| - ) => string[]; |
| 99 | + ) => string[]); |
95 | 100 |
|
96 | 101 | /**
|
97 | 102 | Find files and directories using glob patterns.
|
@@ -146,6 +151,11 @@ declare const globby: {
|
146 | 151 |
|
147 | 152 | readonly gitignore: Gitignore;
|
148 | 153 |
|
| 154 | + ( |
| 155 | + patterns: string | readonly string[], |
| 156 | + options: globby.GlobbyOptions & {objectMode: true} |
| 157 | + ): Promise<globby.Entry[]>; |
| 158 | + |
149 | 159 | /**
|
150 | 160 | Find files and directories using glob patterns.
|
151 | 161 |
|
|
0 commit comments