492b684f3243b808627db15ce279c706c00c959deea1240c1d16f3a2dfa000a80f4d98b9d175e43cdef15d070725a894903d6a8cfb2991be0dfd30c23c2c4d-exec 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. // Type definitions for Glob 7.2
  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. /// <reference types="node" />
  9. import events = require("events");
  10. import minimatch = require("minimatch");
  11. import fs = require("fs");
  12. declare function G(pattern: string, cb: (err: Error | null, matches: string[]) => void): G.IGlob;
  13. declare function G(pattern: string, options: G.IOptions, cb: (err: Error | null, matches: string[]) => void): G.IGlob;
  14. declare namespace G {
  15. function __promisify__(pattern: string, options?: IOptions): Promise<string[]>;
  16. function sync(pattern: string, options?: IOptions): string[];
  17. function hasMagic(pattern: string, options?: IOptions): boolean;
  18. let glob: typeof G;
  19. let Glob: IGlobStatic;
  20. let GlobSync: IGlobSyncStatic;
  21. interface IOptions extends minimatch.IOptions {
  22. cwd?: string | undefined;
  23. root?: string | undefined;
  24. dot?: boolean | undefined;
  25. nomount?: boolean | undefined;
  26. mark?: boolean | undefined;
  27. nosort?: boolean | undefined;
  28. stat?: boolean | undefined;
  29. silent?: boolean | undefined;
  30. strict?: boolean | undefined;
  31. cache?: { [path: string]: boolean | 'DIR' | 'FILE' | ReadonlyArray<string> } | undefined;
  32. statCache?: { [path: string]: false | { isDirectory(): boolean} | undefined } | undefined;
  33. symlinks?: { [path: string]: boolean | undefined } | undefined;
  34. realpathCache?: { [path: string]: string } | undefined;
  35. sync?: boolean | undefined;
  36. nounique?: boolean | undefined;
  37. nonull?: boolean | undefined;
  38. debug?: boolean | undefined;
  39. nobrace?: boolean | undefined;
  40. noglobstar?: boolean | undefined;
  41. noext?: boolean | undefined;
  42. nocase?: boolean | undefined;
  43. matchBase?: any;
  44. nodir?: boolean | undefined;
  45. ignore?: string | ReadonlyArray<string> | undefined;
  46. follow?: boolean | undefined;
  47. realpath?: boolean | undefined;
  48. nonegate?: boolean | undefined;
  49. nocomment?: boolean | undefined;
  50. absolute?: boolean | undefined;
  51. fs?: typeof fs;
  52. }
  53. interface IGlobStatic extends events.EventEmitter {
  54. new (pattern: string, cb?: (err: Error | null, matches: string[]) => void): IGlob;
  55. new (pattern: string, options: IOptions, cb?: (err: Error | null, matches: string[]) => void): IGlob;
  56. prototype: IGlob;
  57. }
  58. interface IGlobSyncStatic {
  59. new (pattern: string, options?: IOptions): IGlobBase;
  60. prototype: IGlobBase;
  61. }
  62. interface IGlobBase {
  63. minimatch: minimatch.IMinimatch;
  64. options: IOptions;
  65. aborted: boolean;
  66. cache: { [path: string]: boolean | 'DIR' | 'FILE' | ReadonlyArray<string> };
  67. statCache: { [path: string]: false | { isDirectory(): boolean; } | undefined };
  68. symlinks: { [path: string]: boolean | undefined };
  69. realpathCache: { [path: string]: string };
  70. found: string[];
  71. }
  72. interface IGlob extends IGlobBase, events.EventEmitter {
  73. pause(): void;
  74. resume(): void;
  75. abort(): void;
  76. }
  77. }
  78. export = G;