source: trip-planner-front/node_modules/@types/glob/index.d.ts@ 6a3a178

Last change on this file since 6a3a178 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 3.3 KB
Line 
1// Type definitions for Glob 7.1
2// Project: https://github.com/isaacs/node-glob
3// Definitions by: vvakame <https://github.com/vvakame>
4// voy <https://github.com/voy>
5// Klaus Meinhardt <https://github.com/ajafff>
6// Piotr Błażejewicz <https://github.com/peterblazejewicz>
7// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
8
9/// <reference types="node" />
10
11import events = require("events");
12import minimatch = require("minimatch");
13
14declare function G(pattern: string, cb: (err: Error | null, matches: string[]) => void): G.IGlob;
15declare function G(pattern: string, options: G.IOptions, cb: (err: Error | null, matches: string[]) => void): G.IGlob;
16
17declare namespace G {
18 function __promisify__(pattern: string, options?: IOptions): Promise<string[]>;
19
20 function sync(pattern: string, options?: IOptions): string[];
21
22 function hasMagic(pattern: string, options?: IOptions): boolean;
23
24 let glob: typeof G;
25 let Glob: IGlobStatic;
26 let GlobSync: IGlobSyncStatic;
27
28 interface IOptions extends minimatch.IOptions {
29 cwd?: string | undefined;
30 root?: string | undefined;
31 dot?: boolean | undefined;
32 nomount?: boolean | undefined;
33 mark?: boolean | undefined;
34 nosort?: boolean | undefined;
35 stat?: boolean | undefined;
36 silent?: boolean | undefined;
37 strict?: boolean | undefined;
38 cache?: { [path: string]: boolean | 'DIR' | 'FILE' | ReadonlyArray<string> } | undefined;
39 statCache?: { [path: string]: false | { isDirectory(): boolean} | undefined } | undefined;
40 symlinks?: { [path: string]: boolean | undefined } | undefined;
41 realpathCache?: { [path: string]: string } | undefined;
42 sync?: boolean | undefined;
43 nounique?: boolean | undefined;
44 nonull?: boolean | undefined;
45 debug?: boolean | undefined;
46 nobrace?: boolean | undefined;
47 noglobstar?: boolean | undefined;
48 noext?: boolean | undefined;
49 nocase?: boolean | undefined;
50 matchBase?: any;
51 nodir?: boolean | undefined;
52 ignore?: string | ReadonlyArray<string> | undefined;
53 follow?: boolean | undefined;
54 realpath?: boolean | undefined;
55 nonegate?: boolean | undefined;
56 nocomment?: boolean | undefined;
57 absolute?: boolean | undefined;
58 }
59
60 interface IGlobStatic extends events.EventEmitter {
61 new (pattern: string, cb?: (err: Error | null, matches: string[]) => void): IGlob;
62 new (pattern: string, options: IOptions, cb?: (err: Error | null, matches: string[]) => void): IGlob;
63 prototype: IGlob;
64 }
65
66 interface IGlobSyncStatic {
67 new (pattern: string, options?: IOptions): IGlobBase;
68 prototype: IGlobBase;
69 }
70
71 interface IGlobBase {
72 minimatch: minimatch.IMinimatch;
73 options: IOptions;
74 aborted: boolean;
75 cache: { [path: string]: boolean | 'DIR' | 'FILE' | ReadonlyArray<string> };
76 statCache: { [path: string]: false | { isDirectory(): boolean; } | undefined };
77 symlinks: { [path: string]: boolean | undefined };
78 realpathCache: { [path: string]: string };
79 found: string[];
80 }
81
82 interface IGlob extends IGlobBase, events.EventEmitter {
83 pause(): void;
84 resume(): void;
85 abort(): void;
86 }
87}
88
89export = G;
Note: See TracBrowser for help on using the repository browser.