Skip to content

Commit e1a3b23

Browse files
committed
1 parent 522efa2 commit e1a3b23

File tree

5 files changed

+490
-590
lines changed

5 files changed

+490
-590
lines changed
Lines changed: 37 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,46 @@
1+
//#region src/utils.d.ts
2+
13
declare const convertPathToPattern: (path: string) => string;
24
declare const escapePath: (path: string) => string;
5+
// #endregion
6+
// #region isDynamicPattern
7+
/*
8+
Has a few minor differences with `fast-glob` for better accuracy:
9+
10+
Doesn't necessarily return false on patterns that include `\\`.
11+
12+
Returns true if the pattern includes parentheses,
13+
regardless of them representing one single pattern or not.
14+
15+
Returns true for unfinished glob extensions i.e. `(h`, `+(h`.
16+
17+
Returns true for unfinished brace expansions as long as they include `,` or `..`.
18+
*/
319
declare function isDynamicPattern(pattern: string, options?: {
4-
caseSensitiveMatch: boolean;
5-
}): boolean;
20+
caseSensitiveMatch: boolean;
21+
}): boolean; //#endregion
22+
//#region src/index.d.ts
623

24+
// #endregion
25+
// #region log
726
interface GlobOptions {
8-
absolute?: boolean;
9-
cwd?: string;
10-
patterns?: string | string[];
11-
ignore?: string | string[];
12-
dot?: boolean;
13-
deep?: number;
14-
followSymbolicLinks?: boolean;
15-
caseSensitiveMatch?: boolean;
16-
expandDirectories?: boolean;
17-
onlyDirectories?: boolean;
18-
onlyFiles?: boolean;
19-
debug?: boolean;
27+
absolute?: boolean;
28+
cwd?: string;
29+
patterns?: string | string[];
30+
ignore?: string | string[];
31+
dot?: boolean;
32+
deep?: number;
33+
followSymbolicLinks?: boolean;
34+
caseSensitiveMatch?: boolean;
35+
expandDirectories?: boolean;
36+
onlyDirectories?: boolean;
37+
onlyFiles?: boolean;
38+
debug?: boolean;
2039
}
21-
declare function glob(patterns: string | string[], options?: Omit<GlobOptions, 'patterns'>): Promise<string[]>;
40+
declare function glob(patterns: string | string[], options?: Omit<GlobOptions, "patterns">): Promise<string[]>;
2241
declare function glob(options: GlobOptions): Promise<string[]>;
23-
declare function globSync(patterns: string | string[], options?: Omit<GlobOptions, 'patterns'>): string[];
42+
declare function globSync(patterns: string | string[], options?: Omit<GlobOptions, "patterns">): string[];
2443
declare function globSync(options: GlobOptions): string[];
2544

26-
export { type GlobOptions, convertPathToPattern, escapePath, glob, globSync, isDynamicPattern };
45+
//#endregion
46+
export { GlobOptions, convertPathToPattern, escapePath, glob, globSync, isDynamicPattern };

0 commit comments

Comments
 (0)