isomorphic-git 1.29.0 → 1.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -15,7 +15,7 @@ export type TreeEntry = {
15
15
  /**
16
16
  * - the type of object
17
17
  */
18
- type: "blob" | "tree" | "commit";
18
+ type: "commit" | "blob" | "tree";
19
19
  };
20
20
  /**
21
21
  * - The object returned has the following schema:
@@ -28,7 +28,7 @@ export type ReadTreeResult = {
28
28
  /**
29
29
  * - the parsed tree object
30
30
  */
31
- tree: TreeEntry[];
31
+ tree: TreeObject;
32
32
  };
33
33
  /**
34
34
  * - The object returned has the following schema:
@@ -51,11 +51,11 @@ export type FetchResult = {
51
51
  */
52
52
  headers?: {
53
53
  [x: string]: string;
54
- };
54
+ } | undefined;
55
55
  /**
56
56
  * - A list of branches that were pruned, if you provided the `prune` parameter
57
57
  */
58
- pruned?: string[];
58
+ pruned?: string[] | undefined;
59
59
  };
60
60
  /**
61
61
  * - Returns an object with a schema like this:
@@ -64,23 +64,23 @@ export type MergeResult = {
64
64
  /**
65
65
  * - The SHA-1 object id that is now at the head of the branch. Absent only if `dryRun` was specified and `mergeCommit` is true.
66
66
  */
67
- oid?: string;
67
+ oid?: string | undefined;
68
68
  /**
69
69
  * - True if the branch was already merged so no changes were made
70
70
  */
71
- alreadyMerged?: boolean;
71
+ alreadyMerged?: boolean | undefined;
72
72
  /**
73
73
  * - True if it was a fast-forward merge
74
74
  */
75
- fastForward?: boolean;
75
+ fastForward?: boolean | undefined;
76
76
  /**
77
77
  * - True if merge resulted in a merge commit
78
78
  */
79
- mergeCommit?: boolean;
79
+ mergeCommit?: boolean | undefined;
80
80
  /**
81
81
  * - The SHA-1 object id of the tree resulting from a merge commit
82
82
  */
83
- tree?: string;
83
+ tree?: string | undefined;
84
84
  };
85
85
  /**
86
86
  * - The object returned has the following schema:
@@ -94,25 +94,25 @@ export type GetRemoteInfoResult = {
94
94
  /**
95
95
  * - The default branch of the remote
96
96
  */
97
- HEAD?: string;
97
+ HEAD?: string | undefined;
98
98
  /**
99
99
  * - The branches on the remote
100
100
  */
101
101
  heads?: {
102
102
  [x: string]: string;
103
- };
103
+ } | undefined;
104
104
  /**
105
105
  * - The special branches representing pull requests (non-standard)
106
106
  */
107
107
  pull?: {
108
108
  [x: string]: string;
109
- };
109
+ } | undefined;
110
110
  /**
111
111
  * - The tags on the remote
112
112
  */
113
113
  tags?: {
114
114
  [x: string]: string;
115
- };
115
+ } | undefined;
116
116
  };
117
117
  /**
118
118
  * - This object has the following schema:
@@ -131,7 +131,7 @@ export type GetRemoteInfo2Result = {
131
131
  /**
132
132
  * - Server refs (they get returned by protocol version 1 whether you want them or not)
133
133
  */
134
- refs?: ServerRef[];
134
+ refs?: ServerRef[] | undefined;
135
135
  };
136
136
  /**
137
137
  * - The object returned has the following schema:
@@ -169,11 +169,11 @@ export type ServerRef = {
169
169
  /**
170
170
  * - The target ref pointed to by a symbolic ref
171
171
  */
172
- target?: string;
172
+ target?: string | undefined;
173
173
  /**
174
174
  * - If the oid is the SHA-1 object id of an annotated tag, this is the SHA-1 object id that the annotated tag points to
175
175
  */
176
- peeled?: string;
176
+ peeled?: string | undefined;
177
177
  };
178
178
  /**
179
179
  * The packObjects command returns an object with two properties:
@@ -186,7 +186,7 @@ export type PackObjectsResult = {
186
186
  /**
187
187
  * - The packfile contents. Not present if `write` parameter was true, in which case the packfile was written straight to disk.
188
188
  */
189
- packfile?: Uint8Array;
189
+ packfile?: Uint8Array<ArrayBuffer> | undefined;
190
190
  };
191
191
  /**
192
192
  * - The object returned has the following schema:
@@ -200,52 +200,52 @@ export type DeflatedObject = {
200
200
  type: "deflated";
201
201
  format: "deflated";
202
202
  object: Uint8Array;
203
- source?: string;
203
+ source?: string | undefined;
204
204
  };
205
205
  export type WrappedObject = {
206
206
  oid: string;
207
207
  type: "wrapped";
208
208
  format: "wrapped";
209
209
  object: Uint8Array;
210
- source?: string;
210
+ source?: string | undefined;
211
211
  };
212
212
  export type RawObject = {
213
213
  oid: string;
214
- type: "blob" | "tree" | "commit" | "tag";
214
+ type: "blob" | "commit" | "tree" | "tag";
215
215
  format: "content";
216
216
  object: Uint8Array;
217
- source?: string;
217
+ source?: string | undefined;
218
218
  };
219
219
  export type ParsedBlobObject = {
220
220
  oid: string;
221
221
  type: "blob";
222
222
  format: "parsed";
223
223
  object: string;
224
- source?: string;
224
+ source?: string | undefined;
225
225
  };
226
226
  export type ParsedCommitObject = {
227
227
  oid: string;
228
228
  type: "commit";
229
229
  format: "parsed";
230
230
  object: CommitObject;
231
- source?: string;
231
+ source?: string | undefined;
232
232
  };
233
233
  export type ParsedTreeObject = {
234
234
  oid: string;
235
235
  type: "tree";
236
236
  format: "parsed";
237
- object: TreeEntry[];
238
- source?: string;
237
+ object: TreeObject;
238
+ source?: string | undefined;
239
239
  };
240
240
  export type ParsedTagObject = {
241
241
  oid: string;
242
242
  type: "tag";
243
243
  format: "parsed";
244
244
  object: TagObject;
245
- source?: string;
245
+ source?: string | undefined;
246
246
  };
247
247
  export type ParsedObject = ParsedBlobObject | ParsedCommitObject | ParsedTreeObject | ParsedTagObject;
248
- export type ReadObjectResult = ParsedBlobObject | ParsedCommitObject | ParsedTreeObject | ParsedTagObject | DeflatedObject | WrappedObject | RawObject;
248
+ export type ReadObjectResult = DeflatedObject | WrappedObject | RawObject | ParsedObject;
249
249
  /**
250
250
  * - The object returned has the following schema:
251
251
  */
@@ -263,10 +263,10 @@ export type ReadTagResult = {
263
263
  */
264
264
  payload: string;
265
265
  };
266
- export type WalkerMap = (filename: string, entries: (WalkerEntry | null)[]) => Promise<any>;
266
+ export type WalkerMap = (filename: string, entries: Array<WalkerEntry | null>) => Promise<any>;
267
267
  export type WalkerReduce = (parent: any, children: any[]) => Promise<any>;
268
268
  export type WalkerIterateCallback = (entries: WalkerEntry[]) => Promise<any[]>;
269
- export type WalkerIterate = (walk: WalkerIterateCallback, children: any) => Promise<any[]>;
269
+ export type WalkerIterate = (walk: WalkerIterateCallback, children: IterableIterator<WalkerEntry[]>) => Promise<any[]>;
270
270
  export type GitProgressEvent = {
271
271
  phase: string;
272
272
  loaded: number;
@@ -281,13 +281,13 @@ export type GitHttpRequest = {
281
281
  /**
282
282
  * - The HTTP method to use
283
283
  */
284
- method?: string;
284
+ method?: string | undefined;
285
285
  /**
286
286
  * - Headers to include in the HTTP request
287
287
  */
288
288
  headers?: {
289
289
  [x: string]: string;
290
- };
290
+ } | undefined;
291
291
  /**
292
292
  * - An HTTP or HTTPS agent that manages connections for the HTTP client (Node.js only)
293
293
  */
@@ -295,15 +295,15 @@ export type GitHttpRequest = {
295
295
  /**
296
296
  * - An async iterator of Uint8Arrays that make up the body of POST requests
297
297
  */
298
- body?: any;
298
+ body?: AsyncIterableIterator<Uint8Array>;
299
299
  /**
300
300
  * - Reserved for future use (emitting `GitProgressEvent`s)
301
301
  */
302
- onProgress?: ProgressCallback;
302
+ onProgress?: ProgressCallback | undefined;
303
303
  /**
304
304
  * - Reserved for future use (canceling a request)
305
305
  */
306
- signal?: any;
306
+ signal?: object;
307
307
  };
308
308
  export type GitHttpResponse = {
309
309
  /**
@@ -313,17 +313,17 @@ export type GitHttpResponse = {
313
313
  /**
314
314
  * - The HTTP method that was used
315
315
  */
316
- method?: string;
316
+ method?: string | undefined;
317
317
  /**
318
318
  * - HTTP response headers
319
319
  */
320
320
  headers?: {
321
321
  [x: string]: string;
322
- };
322
+ } | undefined;
323
323
  /**
324
324
  * - An async iterator of Uint8Arrays that make up the body of the response
325
325
  */
326
- body?: any;
326
+ body?: AsyncIterableIterator<Uint8Array>;
327
327
  /**
328
328
  * - The HTTP status code
329
329
  */
@@ -354,45 +354,21 @@ export type CommitObject = {
354
354
  */
355
355
  parent: string[];
356
356
  author: {
357
- /**
358
- * The author's name
359
- */
360
357
  name: string;
361
- /**
362
- * The author's email
363
- */
364
358
  email: string;
365
- /**
366
- * UTC Unix timestamp in seconds
367
- */
368
359
  timestamp: number;
369
- /**
370
- * Timezone difference from UTC in minutes
371
- */
372
360
  timezoneOffset: number;
373
361
  };
374
362
  committer: {
375
- /**
376
- * The committer's name
377
- */
378
363
  name: string;
379
- /**
380
- * The committer's email
381
- */
382
364
  email: string;
383
- /**
384
- * UTC Unix timestamp in seconds
385
- */
386
365
  timestamp: number;
387
- /**
388
- * Timezone difference from UTC in minutes
389
- */
390
366
  timezoneOffset: number;
391
367
  };
392
368
  /**
393
369
  * PGP signature (if present)
394
370
  */
395
- gpgsig?: string;
371
+ gpgsig?: string | undefined;
396
372
  };
397
373
  /**
398
374
  * A git tree object. Trees represent a directory snapshot.
@@ -415,21 +391,9 @@ export type TagObject = {
415
391
  */
416
392
  tag: string;
417
393
  tagger: {
418
- /**
419
- * the tagger's name
420
- */
421
394
  name: string;
422
- /**
423
- * the tagger's email
424
- */
425
395
  email: string;
426
- /**
427
- * UTC Unix timestamp in seconds
428
- */
429
396
  timestamp: number;
430
- /**
431
- * timezone difference from UTC in minutes
432
- */
433
397
  timezoneOffset: number;
434
398
  };
435
399
  /**
@@ -439,7 +403,7 @@ export type TagObject = {
439
403
  /**
440
404
  * PGP signature (if present)
441
405
  */
442
- gpgsig?: string;
406
+ gpgsig?: string | undefined;
443
407
  };
444
408
  export type ReadCommitResult = {
445
409
  /**
@@ -480,10 +444,10 @@ export type Stat = {
480
444
  * The `WalkerEntry` is an interface that abstracts computing many common tree / blob stats.
481
445
  */
482
446
  export type WalkerEntry = {
483
- type: () => Promise<"blob" | "tree" | "commit" | "special">;
447
+ type: () => Promise<"tree" | "blob" | "special" | "commit">;
484
448
  mode: () => Promise<number>;
485
449
  oid: () => Promise<string>;
486
- content: () => Promise<void | Uint8Array>;
450
+ content: () => Promise<Uint8Array | void>;
487
451
  stat: () => Promise<Stat>;
488
452
  };
489
453
  export type CallbackFsClient = {
@@ -522,79 +486,46 @@ export type CallbackFsClient = {
522
486
  /**
523
487
  * - https://nodejs.org/api/fs.html#fs_fs_readlink_path_options_callback
524
488
  */
525
- readlink?: Function;
489
+ readlink?: Function | undefined;
526
490
  /**
527
491
  * - https://nodejs.org/api/fs.html#fs_fs_symlink_target_path_type_callback
528
492
  */
529
- symlink?: Function;
493
+ symlink?: Function | undefined;
530
494
  /**
531
495
  * - https://nodejs.org/api/fs.html#fs_fs_chmod_path_mode_callback
532
496
  */
533
- chmod?: Function;
497
+ chmod?: Function | undefined;
534
498
  };
535
499
  export type PromiseFsClient = {
536
500
  promises: {
537
- /**
538
- * - https://nodejs.org/api/fs.html#fs_fspromises_readfile_path_options
539
- */
540
501
  readFile: Function;
541
- /**
542
- * - https://nodejs.org/api/fs.html#fs_fspromises_writefile_file_data_options
543
- */
544
502
  writeFile: Function;
545
- /**
546
- * - https://nodejs.org/api/fs.html#fs_fspromises_unlink_path
547
- */
548
503
  unlink: Function;
549
- /**
550
- * - https://nodejs.org/api/fs.html#fs_fspromises_readdir_path_options
551
- */
552
504
  readdir: Function;
553
- /**
554
- * - https://nodejs.org/api/fs.html#fs_fspromises_mkdir_path_options
555
- */
556
505
  mkdir: Function;
557
- /**
558
- * - https://nodejs.org/api/fs.html#fs_fspromises_rmdir_path
559
- */
560
506
  rmdir: Function;
561
- /**
562
- * - https://nodejs.org/api/fs.html#fs_fspromises_stat_path_options
563
- */
564
507
  stat: Function;
565
- /**
566
- * - https://nodejs.org/api/fs.html#fs_fspromises_lstat_path_options
567
- */
568
508
  lstat: Function;
569
- /**
570
- * - https://nodejs.org/api/fs.html#fs_fspromises_readlink_path_options
571
- */
572
- readlink?: Function;
573
- /**
574
- * - https://nodejs.org/api/fs.html#fs_fspromises_symlink_target_path_type
575
- */
576
- symlink?: Function;
577
- /**
578
- * - https://nodejs.org/api/fs.html#fs_fspromises_chmod_path_mode
579
- */
580
- chmod?: Function;
509
+ readlink?: Function | undefined;
510
+ symlink?: Function | undefined;
511
+ chmod?: Function | undefined;
581
512
  };
582
513
  };
583
514
  export type FsClient = CallbackFsClient | PromiseFsClient;
584
515
  export type MessageCallback = (message: string) => void | Promise<void>;
585
516
  export type GitAuth = {
586
- username?: string;
587
- password?: string;
517
+ username?: string | undefined;
518
+ password?: string | undefined;
588
519
  headers?: {
589
520
  [x: string]: string;
590
- };
521
+ } | undefined;
591
522
  /**
592
523
  * Tells git to throw a `UserCanceledError` (instead of an `HttpError`).
593
524
  */
594
- cancel?: boolean;
525
+ cancel?: boolean | undefined;
595
526
  };
596
- export type AuthCallback = (url: string, auth: GitAuth) => void | GitAuth | Promise<void | GitAuth>;
597
- export type AuthFailureCallback = (url: string, auth: GitAuth) => void | GitAuth | Promise<void | GitAuth>;
527
+ export type AuthCallback = (url: string, auth: GitAuth) => GitAuth | void | Promise<GitAuth | void>;
528
+ export type AuthFailureCallback = (url: string, auth: GitAuth) => GitAuth | void | Promise<GitAuth | void>;
598
529
  export type AuthSuccessCallback = (url: string, auth: GitAuth) => void | Promise<void>;
599
530
  export type SignParams = {
600
531
  /**
@@ -612,8 +543,8 @@ export type SignCallback = (args: SignParams) => {
612
543
  signature: string;
613
544
  }>;
614
545
  export type MergeDriverParams = {
615
- branches: string[];
616
- contents: string[];
546
+ branches: Array<string>;
547
+ contents: Array<string>;
617
548
  path: string;
618
549
  };
619
550
  export type MergeDriverCallback = (args: MergeDriverParams) => {
@@ -635,20 +566,20 @@ export type PushResult = {
635
566
  };
636
567
  headers?: {
637
568
  [x: string]: string;
638
- };
569
+ } | undefined;
639
570
  };
640
571
  export type HeadStatus = 0 | 1;
641
572
  export type WorkdirStatus = 0 | 1 | 2;
642
573
  export type StageStatus = 0 | 1 | 2 | 3;
643
- export type StatusRow = [string, 0 | 1, 0 | 1 | 2, 0 | 1 | 2 | 3];
574
+ export type StatusRow = [string, HeadStatus, WorkdirStatus, StageStatus];
644
575
  /**
645
576
  * the type of stash ops
646
577
  */
647
- export type StashOp = "push" | "drop" | "pop" | "apply" | "list" | "clear";
578
+ export type StashOp = "push" | "pop" | "apply" | "drop" | "list" | "clear";
648
579
  /**
649
580
  * - when compare WORDIR to HEAD, 'remove' could mean 'untracked'
650
581
  */
651
- export type StashChangeType = "add" | "unknown" | "remove" | "equal" | "modify";
582
+ export type StashChangeType = "equal" | "modify" | "add" | "remove" | "unknown";
652
583
  export type ClientRef = {
653
584
  /**
654
585
  * The name of the ref
@@ -693,7 +624,6 @@ export type PostCheckoutParams = {
693
624
  type: "branch" | "file";
694
625
  };
695
626
  export type PostCheckoutCallback = (args: PostCheckoutParams) => void | Promise<void>;
696
- export type types = number;
697
627
  declare namespace index {
698
628
  export { Errors };
699
629
  export { STAGE };
@@ -811,7 +741,7 @@ export function STAGE(): Walker;
811
741
  * @returns {Walker}
812
742
  */
813
743
  export function TREE({ ref }?: {
814
- ref?: string;
744
+ ref?: string | undefined;
815
745
  }): Walker;
816
746
  /**
817
747
  * @returns {Walker}
@@ -842,11 +772,11 @@ export function WORKDIR(): Walker;
842
772
  *
843
773
  */
844
774
  export function abortMerge({ fs: _fs, dir, gitdir, commit, cache, }: {
845
- fs: CallbackFsClient | PromiseFsClient;
775
+ fs: FsClient;
846
776
  dir: string;
847
- gitdir?: string;
848
- commit?: string;
849
- cache?: any;
777
+ gitdir?: string | undefined;
778
+ commit?: string | undefined;
779
+ cache?: object;
850
780
  }): Promise<void>;
851
781
  /**
852
782
  * Add a file to the git index (aka staging area)
@@ -869,13 +799,13 @@ export function abortMerge({ fs: _fs, dir, gitdir, commit, cache, }: {
869
799
  *
870
800
  */
871
801
  export function add({ fs: _fs, dir, gitdir, filepath, cache, force, parallel, }: {
872
- fs: CallbackFsClient | PromiseFsClient;
802
+ fs: FsClient;
873
803
  dir: string;
874
- gitdir?: string;
804
+ gitdir?: string | undefined;
875
805
  filepath: string | string[];
876
- cache?: any;
877
- force?: boolean;
878
- parallel?: boolean;
806
+ cache?: object;
807
+ force?: boolean | undefined;
808
+ parallel?: boolean | undefined;
879
809
  }): Promise<void>;
880
810
  /**
881
811
  * Add or update an object note
@@ -905,28 +835,28 @@ export function add({ fs: _fs, dir, gitdir, filepath, cache, force, parallel, }:
905
835
  * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the commit object for the added note.
906
836
  */
907
837
  export function addNote({ fs: _fs, onSign, dir, gitdir, ref, oid, note, force, author: _author, committer: _committer, signingKey, cache, }: {
908
- fs: CallbackFsClient | PromiseFsClient;
909
- onSign?: SignCallback;
910
- dir?: string;
911
- gitdir?: string;
912
- ref?: string;
838
+ fs: FsClient;
839
+ onSign?: SignCallback | undefined;
840
+ dir?: string | undefined;
841
+ gitdir?: string | undefined;
842
+ ref?: string | undefined;
913
843
  oid: string;
914
844
  note: string | Uint8Array;
915
- force?: boolean;
845
+ force?: boolean | undefined;
916
846
  author?: {
917
- name?: string;
918
- email?: string;
919
- timestamp?: number;
920
- timezoneOffset?: number;
921
- };
847
+ name?: string | undefined;
848
+ email?: string | undefined;
849
+ timestamp?: number | undefined;
850
+ timezoneOffset?: number | undefined;
851
+ } | undefined;
922
852
  committer?: {
923
- name?: string;
924
- email?: string;
925
- timestamp?: number;
926
- timezoneOffset?: number;
927
- };
928
- signingKey?: string;
929
- cache?: any;
853
+ name?: string | undefined;
854
+ email?: string | undefined;
855
+ timestamp?: number | undefined;
856
+ timezoneOffset?: number | undefined;
857
+ } | undefined;
858
+ signingKey?: string | undefined;
859
+ cache?: object;
930
860
  }): Promise<string>;
931
861
  /**
932
862
  * Add or update a remote
@@ -952,12 +882,12 @@ export function addNote({ fs: _fs, onSign, dir, gitdir, ref, oid, note, force, a
952
882
  *
953
883
  */
954
884
  export function addRemote({ fs, dir, gitdir, remote, url, force, }: {
955
- fs: CallbackFsClient | PromiseFsClient;
956
- dir?: string;
957
- gitdir?: string;
885
+ fs: FsClient;
886
+ dir?: string | undefined;
887
+ gitdir?: string | undefined;
958
888
  remote: string;
959
889
  url: string;
960
- force?: boolean;
890
+ force?: boolean | undefined;
961
891
  }): Promise<void>;
962
892
  /**
963
893
  * Create an annotated tag.
@@ -997,23 +927,23 @@ export function addRemote({ fs, dir, gitdir, remote, url, force, }: {
997
927
  *
998
928
  */
999
929
  export function annotatedTag({ fs: _fs, onSign, dir, gitdir, ref, tagger: _tagger, message, gpgsig, object, signingKey, force, cache, }: {
1000
- fs: CallbackFsClient | PromiseFsClient;
1001
- onSign?: SignCallback;
1002
- dir?: string;
1003
- gitdir?: string;
930
+ fs: FsClient;
931
+ onSign?: SignCallback | undefined;
932
+ dir?: string | undefined;
933
+ gitdir?: string | undefined;
1004
934
  ref: string;
1005
- message?: string;
1006
- object?: string;
935
+ message?: string | undefined;
936
+ object?: string | undefined;
1007
937
  tagger?: {
1008
- name?: string;
1009
- email?: string;
1010
- timestamp?: number;
1011
- timezoneOffset?: number;
1012
- };
1013
- gpgsig?: string;
1014
- signingKey?: string;
1015
- force?: boolean;
1016
- cache?: any;
938
+ name?: string | undefined;
939
+ email?: string | undefined;
940
+ timestamp?: number | undefined;
941
+ timezoneOffset?: number | undefined;
942
+ } | undefined;
943
+ gpgsig?: string | undefined;
944
+ signingKey?: string | undefined;
945
+ force?: boolean | undefined;
946
+ cache?: object;
1017
947
  }): Promise<void>;
1018
948
  /**
1019
949
  * Create a branch
@@ -1035,13 +965,13 @@ export function annotatedTag({ fs: _fs, onSign, dir, gitdir, ref, tagger: _tagge
1035
965
  *
1036
966
  */
1037
967
  export function branch({ fs, dir, gitdir, ref, object, checkout, force, }: {
1038
- fs: CallbackFsClient | PromiseFsClient;
1039
- dir?: string;
1040
- gitdir?: string;
968
+ fs: FsClient;
969
+ dir?: string | undefined;
970
+ gitdir?: string | undefined;
1041
971
  ref: string;
1042
- object?: string;
1043
- checkout?: boolean;
1044
- force?: boolean;
972
+ object?: string | undefined;
973
+ checkout?: boolean | undefined;
974
+ force?: boolean | undefined;
1045
975
  }): Promise<void>;
1046
976
  /**
1047
977
  * Checkout a branch
@@ -1098,20 +1028,20 @@ export function branch({ fs, dir, gitdir, ref, object, checkout, force, }: {
1098
1028
  * console.log('done')
1099
1029
  */
1100
1030
  export function checkout({ fs, onProgress, onPostCheckout, dir, gitdir, remote, ref: _ref, filepaths, noCheckout, noUpdateHead, dryRun, force, track, cache, }: {
1101
- fs: CallbackFsClient | PromiseFsClient;
1102
- onProgress?: ProgressCallback;
1103
- onPostCheckout?: PostCheckoutCallback;
1031
+ fs: FsClient;
1032
+ onProgress?: ProgressCallback | undefined;
1033
+ onPostCheckout?: PostCheckoutCallback | undefined;
1104
1034
  dir: string;
1105
- gitdir?: string;
1106
- ref?: string;
1107
- filepaths?: string[];
1108
- remote?: string;
1109
- noCheckout?: boolean;
1110
- noUpdateHead?: boolean;
1111
- dryRun?: boolean;
1112
- force?: boolean;
1113
- track?: boolean;
1114
- cache?: any;
1035
+ gitdir?: string | undefined;
1036
+ ref?: string | undefined;
1037
+ filepaths?: string[] | undefined;
1038
+ remote?: string | undefined;
1039
+ noCheckout?: boolean | undefined;
1040
+ noUpdateHead?: boolean | undefined;
1041
+ dryRun?: boolean | undefined;
1042
+ force?: boolean | undefined;
1043
+ track?: boolean | undefined;
1044
+ cache?: object;
1115
1045
  }): Promise<void>;
1116
1046
  /**
1117
1047
  * Clone a repository
@@ -1157,31 +1087,31 @@ export function checkout({ fs, onProgress, onPostCheckout, dir, gitdir, remote,
1157
1087
  *
1158
1088
  */
1159
1089
  export function clone({ fs, http, onProgress, onMessage, onAuth, onAuthSuccess, onAuthFailure, onPostCheckout, dir, gitdir, url, corsProxy, ref, remote, depth, since, exclude, relative, singleBranch, noCheckout, noTags, headers, cache, }: {
1160
- fs: CallbackFsClient | PromiseFsClient;
1090
+ fs: FsClient;
1161
1091
  http: HttpClient;
1162
- onProgress?: ProgressCallback;
1163
- onMessage?: MessageCallback;
1164
- onAuth?: AuthCallback;
1165
- onAuthFailure?: AuthFailureCallback;
1166
- onAuthSuccess?: AuthSuccessCallback;
1167
- onPostCheckout?: PostCheckoutCallback;
1092
+ onProgress?: ProgressCallback | undefined;
1093
+ onMessage?: MessageCallback | undefined;
1094
+ onAuth?: AuthCallback | undefined;
1095
+ onAuthFailure?: AuthFailureCallback | undefined;
1096
+ onAuthSuccess?: AuthSuccessCallback | undefined;
1097
+ onPostCheckout?: PostCheckoutCallback | undefined;
1168
1098
  dir: string;
1169
- gitdir?: string;
1099
+ gitdir?: string | undefined;
1170
1100
  url: string;
1171
- corsProxy?: string;
1172
- ref?: string;
1173
- singleBranch?: boolean;
1174
- noCheckout?: boolean;
1175
- noTags?: boolean;
1176
- remote?: string;
1177
- depth?: number;
1178
- since?: Date;
1179
- exclude?: string[];
1180
- relative?: boolean;
1101
+ corsProxy?: string | undefined;
1102
+ ref?: string | undefined;
1103
+ singleBranch?: boolean | undefined;
1104
+ noCheckout?: boolean | undefined;
1105
+ noTags?: boolean | undefined;
1106
+ remote?: string | undefined;
1107
+ depth?: number | undefined;
1108
+ since?: Date | undefined;
1109
+ exclude?: string[] | undefined;
1110
+ relative?: boolean | undefined;
1181
1111
  headers?: {
1182
1112
  [x: string]: string;
1183
- };
1184
- cache?: any;
1113
+ } | undefined;
1114
+ cache?: object;
1185
1115
  }): Promise<void>;
1186
1116
  /**
1187
1117
  * Create a new commit
@@ -1227,31 +1157,31 @@ export function clone({ fs, http, onProgress, onMessage, onAuth, onAuthSuccess,
1227
1157
  *
1228
1158
  */
1229
1159
  export function commit({ fs: _fs, onSign, dir, gitdir, message, author, committer, signingKey, amend, dryRun, noUpdateBranch, ref, parent, tree, cache, }: {
1230
- fs: CallbackFsClient | PromiseFsClient;
1231
- onSign?: SignCallback;
1232
- dir?: string;
1233
- gitdir?: string;
1234
- message?: string;
1160
+ fs: FsClient;
1161
+ onSign?: SignCallback | undefined;
1162
+ dir?: string | undefined;
1163
+ gitdir?: string | undefined;
1164
+ message?: string | undefined;
1235
1165
  author?: {
1236
- name?: string;
1237
- email?: string;
1238
- timestamp?: number;
1239
- timezoneOffset?: number;
1240
- };
1166
+ name?: string | undefined;
1167
+ email?: string | undefined;
1168
+ timestamp?: number | undefined;
1169
+ timezoneOffset?: number | undefined;
1170
+ } | undefined;
1241
1171
  committer?: {
1242
- name?: string;
1243
- email?: string;
1244
- timestamp?: number;
1245
- timezoneOffset?: number;
1246
- };
1247
- signingKey?: string;
1248
- amend?: boolean;
1249
- dryRun?: boolean;
1250
- noUpdateBranch?: boolean;
1251
- ref?: string;
1252
- parent?: string[];
1253
- tree?: string;
1254
- cache?: any;
1172
+ name?: string | undefined;
1173
+ email?: string | undefined;
1174
+ timestamp?: number | undefined;
1175
+ timezoneOffset?: number | undefined;
1176
+ } | undefined;
1177
+ signingKey?: string | undefined;
1178
+ amend?: boolean | undefined;
1179
+ dryRun?: boolean | undefined;
1180
+ noUpdateBranch?: boolean | undefined;
1181
+ ref?: string | undefined;
1182
+ parent?: string[] | undefined;
1183
+ tree?: string | undefined;
1184
+ cache?: object;
1255
1185
  }): Promise<string>;
1256
1186
  /**
1257
1187
  * Get the name of the branch currently pointed to by .git/HEAD
@@ -1276,11 +1206,11 @@ export function commit({ fs: _fs, onSign, dir, gitdir, message, author, committe
1276
1206
  *
1277
1207
  */
1278
1208
  export function currentBranch({ fs, dir, gitdir, fullname, test, }: {
1279
- fs: CallbackFsClient | PromiseFsClient;
1280
- dir?: string;
1281
- gitdir?: string;
1282
- fullname?: boolean;
1283
- test?: boolean;
1209
+ fs: FsClient;
1210
+ dir?: string | undefined;
1211
+ gitdir?: string | undefined;
1212
+ fullname?: boolean | undefined;
1213
+ test?: boolean | undefined;
1284
1214
  }): Promise<string | void>;
1285
1215
  /**
1286
1216
  * Delete a local branch
@@ -1301,9 +1231,9 @@ export function currentBranch({ fs, dir, gitdir, fullname, test, }: {
1301
1231
  *
1302
1232
  */
1303
1233
  export function deleteBranch({ fs, dir, gitdir, ref, }: {
1304
- fs: CallbackFsClient | PromiseFsClient;
1305
- dir?: string;
1306
- gitdir?: string;
1234
+ fs: FsClient;
1235
+ dir?: string | undefined;
1236
+ gitdir?: string | undefined;
1307
1237
  ref: string;
1308
1238
  }): Promise<void>;
1309
1239
  /**
@@ -1323,9 +1253,9 @@ export function deleteBranch({ fs, dir, gitdir, ref, }: {
1323
1253
  *
1324
1254
  */
1325
1255
  export function deleteRef({ fs, dir, gitdir, ref }: {
1326
- fs: CallbackFsClient | PromiseFsClient;
1327
- dir?: string;
1328
- gitdir?: string;
1256
+ fs: FsClient;
1257
+ dir?: string | undefined;
1258
+ gitdir?: string | undefined;
1329
1259
  ref: string;
1330
1260
  }): Promise<void>;
1331
1261
  /**
@@ -1345,9 +1275,9 @@ export function deleteRef({ fs, dir, gitdir, ref }: {
1345
1275
  *
1346
1276
  */
1347
1277
  export function deleteRemote({ fs, dir, gitdir, remote, }: {
1348
- fs: CallbackFsClient | PromiseFsClient;
1349
- dir?: string;
1350
- gitdir?: string;
1278
+ fs: FsClient;
1279
+ dir?: string | undefined;
1280
+ gitdir?: string | undefined;
1351
1281
  remote: string;
1352
1282
  }): Promise<void>;
1353
1283
  /**
@@ -1367,9 +1297,9 @@ export function deleteRemote({ fs, dir, gitdir, remote, }: {
1367
1297
  *
1368
1298
  */
1369
1299
  export function deleteTag({ fs, dir, gitdir, ref }: {
1370
- fs: CallbackFsClient | PromiseFsClient;
1371
- dir?: string;
1372
- gitdir?: string;
1300
+ fs: FsClient;
1301
+ dir?: string | undefined;
1302
+ gitdir?: string | undefined;
1373
1303
  ref: string;
1374
1304
  }): Promise<void>;
1375
1305
  /**
@@ -1390,11 +1320,11 @@ export function deleteTag({ fs, dir, gitdir, ref }: {
1390
1320
  *
1391
1321
  */
1392
1322
  export function expandOid({ fs, dir, gitdir, oid, cache, }: {
1393
- fs: CallbackFsClient | PromiseFsClient;
1394
- dir?: string;
1395
- gitdir?: string;
1323
+ fs: FsClient;
1324
+ dir?: string | undefined;
1325
+ gitdir?: string | undefined;
1396
1326
  oid: string;
1397
- cache?: any;
1327
+ cache?: object;
1398
1328
  }): Promise<string>;
1399
1329
  /**
1400
1330
  * Expand an abbreviated ref to its full name
@@ -1413,9 +1343,9 @@ export function expandOid({ fs, dir, gitdir, oid, cache, }: {
1413
1343
  *
1414
1344
  */
1415
1345
  export function expandRef({ fs, dir, gitdir, ref }: {
1416
- fs: CallbackFsClient | PromiseFsClient;
1417
- dir?: string;
1418
- gitdir?: string;
1346
+ fs: FsClient;
1347
+ dir?: string | undefined;
1348
+ gitdir?: string | undefined;
1419
1349
  ref: string;
1420
1350
  }): Promise<string>;
1421
1351
  /**
@@ -1454,25 +1384,25 @@ export function expandRef({ fs, dir, gitdir, ref }: {
1454
1384
  *
1455
1385
  */
1456
1386
  export function fastForward({ fs, http, onProgress, onMessage, onAuth, onAuthSuccess, onAuthFailure, dir, gitdir, ref, url, remote, remoteRef, corsProxy, singleBranch, headers, cache, }: {
1457
- fs: CallbackFsClient | PromiseFsClient;
1387
+ fs: FsClient;
1458
1388
  http: HttpClient;
1459
- onProgress?: ProgressCallback;
1460
- onMessage?: MessageCallback;
1461
- onAuth?: AuthCallback;
1462
- onAuthFailure?: AuthFailureCallback;
1463
- onAuthSuccess?: AuthSuccessCallback;
1389
+ onProgress?: ProgressCallback | undefined;
1390
+ onMessage?: MessageCallback | undefined;
1391
+ onAuth?: AuthCallback | undefined;
1392
+ onAuthFailure?: AuthFailureCallback | undefined;
1393
+ onAuthSuccess?: AuthSuccessCallback | undefined;
1464
1394
  dir: string;
1465
- gitdir?: string;
1466
- ref?: string;
1467
- url?: string;
1468
- remote?: string;
1469
- remoteRef?: string;
1470
- corsProxy?: string;
1471
- singleBranch?: boolean;
1395
+ gitdir?: string | undefined;
1396
+ ref?: string | undefined;
1397
+ url?: string | undefined;
1398
+ remote?: string | undefined;
1399
+ remoteRef?: string | undefined;
1400
+ corsProxy?: string | undefined;
1401
+ singleBranch?: boolean | undefined;
1472
1402
  headers?: {
1473
1403
  [x: string]: string;
1474
- };
1475
- cache?: any;
1404
+ } | undefined;
1405
+ cache?: object;
1476
1406
  }): Promise<void>;
1477
1407
  /**
1478
1408
  *
@@ -1532,32 +1462,32 @@ export function fastForward({ fs, http, onProgress, onMessage, onAuth, onAuthSuc
1532
1462
  *
1533
1463
  */
1534
1464
  export function fetch({ fs, http, onProgress, onMessage, onAuth, onAuthSuccess, onAuthFailure, dir, gitdir, ref, remote, remoteRef, url, corsProxy, depth, since, exclude, relative, tags, singleBranch, headers, prune, pruneTags, cache, }: {
1535
- fs: CallbackFsClient | PromiseFsClient;
1465
+ fs: FsClient;
1536
1466
  http: HttpClient;
1537
- onProgress?: ProgressCallback;
1538
- onMessage?: MessageCallback;
1539
- onAuth?: AuthCallback;
1540
- onAuthFailure?: AuthFailureCallback;
1541
- onAuthSuccess?: AuthSuccessCallback;
1542
- dir?: string;
1543
- gitdir?: string;
1544
- url?: string;
1545
- remote?: string;
1546
- singleBranch?: boolean;
1547
- ref?: string;
1548
- remoteRef?: string;
1549
- tags?: boolean;
1550
- depth?: number;
1551
- relative?: boolean;
1552
- since?: Date;
1553
- exclude?: string[];
1554
- prune?: boolean;
1555
- pruneTags?: boolean;
1556
- corsProxy?: string;
1467
+ onProgress?: ProgressCallback | undefined;
1468
+ onMessage?: MessageCallback | undefined;
1469
+ onAuth?: AuthCallback | undefined;
1470
+ onAuthFailure?: AuthFailureCallback | undefined;
1471
+ onAuthSuccess?: AuthSuccessCallback | undefined;
1472
+ dir?: string | undefined;
1473
+ gitdir?: string | undefined;
1474
+ url?: string | undefined;
1475
+ remote?: string | undefined;
1476
+ singleBranch?: boolean | undefined;
1477
+ ref?: string | undefined;
1478
+ remoteRef?: string | undefined;
1479
+ tags?: boolean | undefined;
1480
+ depth?: number | undefined;
1481
+ relative?: boolean | undefined;
1482
+ since?: Date | undefined;
1483
+ exclude?: string[] | undefined;
1484
+ prune?: boolean | undefined;
1485
+ pruneTags?: boolean | undefined;
1486
+ corsProxy?: string | undefined;
1557
1487
  headers?: {
1558
1488
  [x: string]: string;
1559
- };
1560
- cache?: any;
1489
+ } | undefined;
1490
+ cache?: object;
1561
1491
  }): Promise<FetchResult>;
1562
1492
  /**
1563
1493
  * Find the merge base for a set of commits
@@ -1571,11 +1501,11 @@ export function fetch({ fs, http, onProgress, onMessage, onAuth, onAuthSuccess,
1571
1501
  *
1572
1502
  */
1573
1503
  export function findMergeBase({ fs, dir, gitdir, oids, cache, }: {
1574
- fs: CallbackFsClient | PromiseFsClient;
1575
- dir?: string;
1576
- gitdir?: string;
1504
+ fs: FsClient;
1505
+ dir?: string | undefined;
1506
+ gitdir?: string | undefined;
1577
1507
  oids: string[];
1578
- cache?: any;
1508
+ cache?: object;
1579
1509
  }): Promise<any[]>;
1580
1510
  /**
1581
1511
  * Find the root git directory
@@ -1598,7 +1528,7 @@ export function findMergeBase({ fs, dir, gitdir, oids, cache, }: {
1598
1528
  *
1599
1529
  */
1600
1530
  export function findRoot({ fs, filepath }: {
1601
- fs: CallbackFsClient | PromiseFsClient;
1531
+ fs: FsClient;
1602
1532
  filepath: string;
1603
1533
  }): Promise<string>;
1604
1534
  /**
@@ -1627,9 +1557,9 @@ export function findRoot({ fs, filepath }: {
1627
1557
  *
1628
1558
  */
1629
1559
  export function getConfig({ fs, dir, gitdir, path }: {
1630
- fs: CallbackFsClient | PromiseFsClient;
1631
- dir?: string;
1632
- gitdir?: string;
1560
+ fs: FsClient;
1561
+ dir?: string | undefined;
1562
+ gitdir?: string | undefined;
1633
1563
  path: string;
1634
1564
  }): Promise<any>;
1635
1565
  /**
@@ -1649,11 +1579,11 @@ export function getConfig({ fs, dir, gitdir, path }: {
1649
1579
  *
1650
1580
  */
1651
1581
  export function getConfigAll({ fs, dir, gitdir, path, }: {
1652
- fs: CallbackFsClient | PromiseFsClient;
1653
- dir?: string;
1654
- gitdir?: string;
1582
+ fs: FsClient;
1583
+ dir?: string | undefined;
1584
+ gitdir?: string | undefined;
1655
1585
  path: string;
1656
- }): Promise<any[]>;
1586
+ }): Promise<Array<any>>;
1657
1587
  /**
1658
1588
  *
1659
1589
  * @typedef {Object} GetRemoteInfoResult - The object returned has the following schema:
@@ -1695,15 +1625,15 @@ export function getConfigAll({ fs, dir, gitdir, path, }: {
1695
1625
  */
1696
1626
  export function getRemoteInfo({ http, onAuth, onAuthSuccess, onAuthFailure, corsProxy, url, headers, forPush, }: {
1697
1627
  http: HttpClient;
1698
- onAuth?: AuthCallback;
1699
- onAuthFailure?: AuthFailureCallback;
1700
- onAuthSuccess?: AuthSuccessCallback;
1628
+ onAuth?: AuthCallback | undefined;
1629
+ onAuthFailure?: AuthFailureCallback | undefined;
1630
+ onAuthSuccess?: AuthSuccessCallback | undefined;
1701
1631
  url: string;
1702
- corsProxy?: string;
1703
- forPush?: boolean;
1632
+ corsProxy?: string | undefined;
1633
+ forPush?: boolean | undefined;
1704
1634
  headers?: {
1705
1635
  [x: string]: string;
1706
- };
1636
+ } | undefined;
1707
1637
  }): Promise<GetRemoteInfoResult>;
1708
1638
  /**
1709
1639
  * @typedef {Object} GetRemoteInfo2Result - This object has the following schema:
@@ -1752,16 +1682,16 @@ export function getRemoteInfo({ http, onAuth, onAuthSuccess, onAuthFailure, cors
1752
1682
  */
1753
1683
  export function getRemoteInfo2({ http, onAuth, onAuthSuccess, onAuthFailure, corsProxy, url, headers, forPush, protocolVersion, }: {
1754
1684
  http: HttpClient;
1755
- onAuth?: AuthCallback;
1756
- onAuthFailure?: AuthFailureCallback;
1757
- onAuthSuccess?: AuthSuccessCallback;
1685
+ onAuth?: AuthCallback | undefined;
1686
+ onAuthFailure?: AuthFailureCallback | undefined;
1687
+ onAuthSuccess?: AuthSuccessCallback | undefined;
1758
1688
  url: string;
1759
- corsProxy?: string;
1760
- forPush?: boolean;
1689
+ corsProxy?: string | undefined;
1690
+ forPush?: boolean | undefined;
1761
1691
  headers?: {
1762
1692
  [x: string]: string;
1763
- };
1764
- protocolVersion?: 1 | 2;
1693
+ } | undefined;
1694
+ protocolVersion?: 2 | 1 | undefined;
1765
1695
  }): Promise<GetRemoteInfo2Result>;
1766
1696
  /**
1767
1697
  *
@@ -1793,7 +1723,7 @@ export function getRemoteInfo2({ http, onAuth, onAuthSuccess, onAuthFailure, cor
1793
1723
  *
1794
1724
  */
1795
1725
  export function hashBlob({ object }: {
1796
- object: string | Uint8Array;
1726
+ object: Uint8Array | string;
1797
1727
  }): Promise<HashBlobResult>;
1798
1728
  /**
1799
1729
  * Create the .idx file for a given .pack file
@@ -1825,12 +1755,12 @@ export function hashBlob({ object }: {
1825
1755
  *
1826
1756
  */
1827
1757
  export function indexPack({ fs, onProgress, dir, gitdir, filepath, cache, }: {
1828
- fs: CallbackFsClient | PromiseFsClient;
1829
- onProgress?: ProgressCallback;
1758
+ fs: FsClient;
1759
+ onProgress?: ProgressCallback | undefined;
1830
1760
  dir: string;
1831
- gitdir?: string;
1761
+ gitdir?: string | undefined;
1832
1762
  filepath: string;
1833
- cache?: any;
1763
+ cache?: object;
1834
1764
  }): Promise<{
1835
1765
  oids: string[];
1836
1766
  }>;
@@ -1851,11 +1781,11 @@ export function indexPack({ fs, onProgress, dir, gitdir, filepath, cache, }: {
1851
1781
  *
1852
1782
  */
1853
1783
  export function init({ fs, bare, dir, gitdir, defaultBranch, }: {
1854
- fs: CallbackFsClient | PromiseFsClient;
1855
- dir?: string;
1856
- gitdir?: string;
1857
- bare?: boolean;
1858
- defaultBranch?: string;
1784
+ fs: FsClient;
1785
+ dir?: string | undefined;
1786
+ gitdir?: string | undefined;
1787
+ bare?: boolean | undefined;
1788
+ defaultBranch?: string | undefined;
1859
1789
  }): Promise<void>;
1860
1790
  /**
1861
1791
  * Check whether a git commit is descended from another
@@ -1879,13 +1809,13 @@ export function init({ fs, bare, dir, gitdir, defaultBranch, }: {
1879
1809
  *
1880
1810
  */
1881
1811
  export function isDescendent({ fs, dir, gitdir, oid, ancestor, depth, cache, }: {
1882
- fs: CallbackFsClient | PromiseFsClient;
1883
- dir?: string;
1884
- gitdir?: string;
1812
+ fs: FsClient;
1813
+ dir?: string | undefined;
1814
+ gitdir?: string | undefined;
1885
1815
  oid: string;
1886
1816
  ancestor: string;
1887
- depth?: number;
1888
- cache?: any;
1817
+ depth?: number | undefined;
1818
+ cache?: object;
1889
1819
  }): Promise<boolean>;
1890
1820
  /**
1891
1821
  * Test whether a filepath should be ignored (because of .gitignore or .git/exclude)
@@ -1903,9 +1833,9 @@ export function isDescendent({ fs, dir, gitdir, oid, ancestor, depth, cache, }:
1903
1833
  *
1904
1834
  */
1905
1835
  export function isIgnored({ fs, dir, gitdir, filepath, }: {
1906
- fs: CallbackFsClient | PromiseFsClient;
1836
+ fs: FsClient;
1907
1837
  dir: string;
1908
- gitdir?: string;
1838
+ gitdir?: string | undefined;
1909
1839
  filepath: string;
1910
1840
  }): Promise<boolean>;
1911
1841
  /**
@@ -1936,11 +1866,11 @@ export function isIgnored({ fs, dir, gitdir, filepath, }: {
1936
1866
  *
1937
1867
  */
1938
1868
  export function listBranches({ fs, dir, gitdir, remote, }: {
1939
- fs: CallbackFsClient | PromiseFsClient;
1940
- dir?: string;
1941
- gitdir?: string;
1942
- remote?: string;
1943
- }): Promise<string[]>;
1869
+ fs: FsClient;
1870
+ dir?: string | undefined;
1871
+ gitdir?: string | undefined;
1872
+ remote?: string | undefined;
1873
+ }): Promise<Array<string>>;
1944
1874
  /**
1945
1875
  * List all the files in the git index or a commit
1946
1876
  *
@@ -1966,12 +1896,12 @@ export function listBranches({ fs, dir, gitdir, remote, }: {
1966
1896
  *
1967
1897
  */
1968
1898
  export function listFiles({ fs, dir, gitdir, ref, cache, }: {
1969
- fs: CallbackFsClient | PromiseFsClient;
1970
- dir?: string;
1971
- gitdir?: string;
1972
- ref?: string;
1973
- cache?: any;
1974
- }): Promise<string[]>;
1899
+ fs: FsClient;
1900
+ dir?: string | undefined;
1901
+ gitdir?: string | undefined;
1902
+ ref?: string | undefined;
1903
+ cache?: object;
1904
+ }): Promise<Array<string>>;
1975
1905
  /**
1976
1906
  * List all the object notes
1977
1907
  *
@@ -1985,15 +1915,15 @@ export function listFiles({ fs, dir, gitdir, ref, cache, }: {
1985
1915
  * @returns {Promise<Array<{target: string, note: string}>>} Resolves successfully with an array of entries containing SHA-1 object ids of the note and the object the note targets
1986
1916
  */
1987
1917
  export function listNotes({ fs, dir, gitdir, ref, cache, }: {
1988
- fs: CallbackFsClient | PromiseFsClient;
1989
- dir?: string;
1990
- gitdir?: string;
1991
- ref?: string;
1992
- cache?: any;
1993
- }): Promise<{
1918
+ fs: FsClient;
1919
+ dir?: string | undefined;
1920
+ gitdir?: string | undefined;
1921
+ ref?: string | undefined;
1922
+ cache?: object;
1923
+ }): Promise<Array<{
1994
1924
  target: string;
1995
1925
  note: string;
1996
- }[]>;
1926
+ }>>;
1997
1927
  /**
1998
1928
  * List refs
1999
1929
  *
@@ -2011,11 +1941,11 @@ export function listNotes({ fs, dir, gitdir, ref, cache, }: {
2011
1941
  *
2012
1942
  */
2013
1943
  export function listRefs({ fs, dir, gitdir, filepath, }: {
2014
- fs: CallbackFsClient | PromiseFsClient;
2015
- dir?: string;
2016
- gitdir?: string;
2017
- filepath?: string;
2018
- }): Promise<string[]>;
1944
+ fs: FsClient;
1945
+ dir?: string | undefined;
1946
+ gitdir?: string | undefined;
1947
+ filepath?: string | undefined;
1948
+ }): Promise<Array<string>>;
2019
1949
  /**
2020
1950
  * List remotes
2021
1951
  *
@@ -2032,13 +1962,13 @@ export function listRefs({ fs, dir, gitdir, filepath, }: {
2032
1962
  *
2033
1963
  */
2034
1964
  export function listRemotes({ fs, dir, gitdir }: {
2035
- fs: CallbackFsClient | PromiseFsClient;
2036
- dir?: string;
2037
- gitdir?: string;
2038
- }): Promise<{
1965
+ fs: FsClient;
1966
+ dir?: string | undefined;
1967
+ gitdir?: string | undefined;
1968
+ }): Promise<Array<{
2039
1969
  remote: string;
2040
1970
  url: string;
2041
- }[]>;
1971
+ }>>;
2042
1972
  /**
2043
1973
  * Fetch a list of refs (branches, tags, etc) from a server.
2044
1974
  *
@@ -2136,19 +2066,19 @@ export function listRemotes({ fs, dir, gitdir }: {
2136
2066
  */
2137
2067
  export function listServerRefs({ http, onAuth, onAuthSuccess, onAuthFailure, corsProxy, url, headers, forPush, protocolVersion, prefix, symrefs, peelTags, }: {
2138
2068
  http: HttpClient;
2139
- onAuth?: AuthCallback;
2140
- onAuthFailure?: AuthFailureCallback;
2141
- onAuthSuccess?: AuthSuccessCallback;
2069
+ onAuth?: AuthCallback | undefined;
2070
+ onAuthFailure?: AuthFailureCallback | undefined;
2071
+ onAuthSuccess?: AuthSuccessCallback | undefined;
2142
2072
  url: string;
2143
- corsProxy?: string;
2144
- forPush?: boolean;
2073
+ corsProxy?: string | undefined;
2074
+ forPush?: boolean | undefined;
2145
2075
  headers?: {
2146
2076
  [x: string]: string;
2147
- };
2148
- protocolVersion?: 1 | 2;
2149
- prefix?: string;
2150
- symrefs?: boolean;
2151
- peelTags?: boolean;
2077
+ } | undefined;
2078
+ protocolVersion?: 2 | 1 | undefined;
2079
+ prefix?: string | undefined;
2080
+ symrefs?: boolean | undefined;
2081
+ peelTags?: boolean | undefined;
2152
2082
  }): Promise<ServerRef[]>;
2153
2083
  /**
2154
2084
  * List tags
@@ -2166,10 +2096,10 @@ export function listServerRefs({ http, onAuth, onAuthSuccess, onAuthFailure, cor
2166
2096
  *
2167
2097
  */
2168
2098
  export function listTags({ fs, dir, gitdir }: {
2169
- fs: CallbackFsClient | PromiseFsClient;
2170
- dir?: string;
2171
- gitdir?: string;
2172
- }): Promise<string[]>;
2099
+ fs: FsClient;
2100
+ dir?: string | undefined;
2101
+ gitdir?: string | undefined;
2102
+ }): Promise<Array<string>>;
2173
2103
  /**
2174
2104
  * Get commit descriptions from the git history
2175
2105
  *
@@ -2200,17 +2130,17 @@ export function listTags({ fs, dir, gitdir }: {
2200
2130
  *
2201
2131
  */
2202
2132
  export function log({ fs, dir, gitdir, filepath, ref, depth, since, force, follow, cache, }: {
2203
- fs: CallbackFsClient | PromiseFsClient;
2204
- dir?: string;
2205
- gitdir?: string;
2133
+ fs: FsClient;
2134
+ dir?: string | undefined;
2135
+ gitdir?: string | undefined;
2206
2136
  filepath?: string | undefined;
2207
- ref?: string;
2137
+ ref?: string | undefined;
2208
2138
  depth?: number | undefined;
2209
- since?: Date;
2139
+ since?: Date | undefined;
2210
2140
  force?: boolean | undefined;
2211
2141
  follow?: boolean | undefined;
2212
- cache?: any;
2213
- }): Promise<ReadCommitResult[]>;
2142
+ cache?: object;
2143
+ }): Promise<Array<ReadCommitResult>>;
2214
2144
  /**
2215
2145
  *
2216
2146
  * @typedef {Object} MergeResult - Returns an object with a schema like this:
@@ -2322,33 +2252,33 @@ export function log({ fs, dir, gitdir, filepath, ref, depth, since, force, follo
2322
2252
  *
2323
2253
  */
2324
2254
  export function merge({ fs: _fs, onSign, dir, gitdir, ours, theirs, fastForward, fastForwardOnly, dryRun, noUpdateBranch, abortOnConflict, message, author: _author, committer: _committer, signingKey, cache, mergeDriver, }: {
2325
- fs: CallbackFsClient | PromiseFsClient;
2326
- onSign?: SignCallback;
2327
- dir?: string;
2328
- gitdir?: string;
2329
- ours?: string;
2255
+ fs: FsClient;
2256
+ onSign?: SignCallback | undefined;
2257
+ dir?: string | undefined;
2258
+ gitdir?: string | undefined;
2259
+ ours?: string | undefined;
2330
2260
  theirs: string;
2331
- fastForward?: boolean;
2332
- fastForwardOnly?: boolean;
2333
- dryRun?: boolean;
2334
- noUpdateBranch?: boolean;
2335
- abortOnConflict?: boolean;
2336
- message?: string;
2261
+ fastForward?: boolean | undefined;
2262
+ fastForwardOnly?: boolean | undefined;
2263
+ dryRun?: boolean | undefined;
2264
+ noUpdateBranch?: boolean | undefined;
2265
+ abortOnConflict?: boolean | undefined;
2266
+ message?: string | undefined;
2337
2267
  author?: {
2338
- name?: string;
2339
- email?: string;
2340
- timestamp?: number;
2341
- timezoneOffset?: number;
2342
- };
2268
+ name?: string | undefined;
2269
+ email?: string | undefined;
2270
+ timestamp?: number | undefined;
2271
+ timezoneOffset?: number | undefined;
2272
+ } | undefined;
2343
2273
  committer?: {
2344
- name?: string;
2345
- email?: string;
2346
- timestamp?: number;
2347
- timezoneOffset?: number;
2348
- };
2349
- signingKey?: string;
2350
- cache?: any;
2351
- mergeDriver?: MergeDriverCallback;
2274
+ name?: string | undefined;
2275
+ email?: string | undefined;
2276
+ timestamp?: number | undefined;
2277
+ timezoneOffset?: number | undefined;
2278
+ } | undefined;
2279
+ signingKey?: string | undefined;
2280
+ cache?: object;
2281
+ mergeDriver?: MergeDriverCallback | undefined;
2352
2282
  }): Promise<MergeResult>;
2353
2283
  /**
2354
2284
  *
@@ -2381,12 +2311,12 @@ export function merge({ fs: _fs, onSign, dir, gitdir, ours, theirs, fastForward,
2381
2311
  *
2382
2312
  */
2383
2313
  export function packObjects({ fs, dir, gitdir, oids, write, cache, }: {
2384
- fs: CallbackFsClient | PromiseFsClient;
2385
- dir?: string;
2386
- gitdir?: string;
2314
+ fs: FsClient;
2315
+ dir?: string | undefined;
2316
+ gitdir?: string | undefined;
2387
2317
  oids: string[];
2388
- write?: boolean;
2389
- cache?: any;
2318
+ write?: boolean | undefined;
2319
+ cache?: object;
2390
2320
  }): Promise<PackObjectsResult>;
2391
2321
  /**
2392
2322
  * Fetch and merge commits from a remote repository
@@ -2439,42 +2369,42 @@ export function packObjects({ fs, dir, gitdir, oids, write, cache, }: {
2439
2369
  *
2440
2370
  */
2441
2371
  export function pull({ fs: _fs, http, onProgress, onMessage, onAuth, onAuthSuccess, onAuthFailure, dir, gitdir, ref, url, remote, remoteRef, prune, pruneTags, fastForward, fastForwardOnly, corsProxy, singleBranch, headers, author: _author, committer: _committer, signingKey, cache, }: {
2442
- fs: CallbackFsClient | PromiseFsClient;
2372
+ fs: FsClient;
2443
2373
  http: HttpClient;
2444
- onProgress?: ProgressCallback;
2445
- onMessage?: MessageCallback;
2446
- onAuth?: AuthCallback;
2447
- onAuthFailure?: AuthFailureCallback;
2448
- onAuthSuccess?: AuthSuccessCallback;
2374
+ onProgress?: ProgressCallback | undefined;
2375
+ onMessage?: MessageCallback | undefined;
2376
+ onAuth?: AuthCallback | undefined;
2377
+ onAuthFailure?: AuthFailureCallback | undefined;
2378
+ onAuthSuccess?: AuthSuccessCallback | undefined;
2449
2379
  dir: string;
2450
- gitdir?: string;
2451
- ref?: string;
2452
- url?: string;
2453
- remote?: string;
2454
- remoteRef?: string;
2455
- prune?: boolean;
2456
- pruneTags?: boolean;
2457
- corsProxy?: string;
2458
- singleBranch?: boolean;
2459
- fastForward?: boolean;
2460
- fastForwardOnly?: boolean;
2380
+ gitdir?: string | undefined;
2381
+ ref?: string | undefined;
2382
+ url?: string | undefined;
2383
+ remote?: string | undefined;
2384
+ remoteRef?: string | undefined;
2385
+ prune?: boolean | undefined;
2386
+ pruneTags?: boolean | undefined;
2387
+ corsProxy?: string | undefined;
2388
+ singleBranch?: boolean | undefined;
2389
+ fastForward?: boolean | undefined;
2390
+ fastForwardOnly?: boolean | undefined;
2461
2391
  headers?: {
2462
2392
  [x: string]: string;
2463
- };
2393
+ } | undefined;
2464
2394
  author?: {
2465
- name?: string;
2466
- email?: string;
2467
- timestamp?: number;
2468
- timezoneOffset?: number;
2469
- };
2395
+ name?: string | undefined;
2396
+ email?: string | undefined;
2397
+ timestamp?: number | undefined;
2398
+ timezoneOffset?: number | undefined;
2399
+ } | undefined;
2470
2400
  committer?: {
2471
- name?: string;
2472
- email?: string;
2473
- timestamp?: number;
2474
- timezoneOffset?: number;
2475
- };
2476
- signingKey?: string;
2477
- cache?: any;
2401
+ name?: string | undefined;
2402
+ email?: string | undefined;
2403
+ timestamp?: number | undefined;
2404
+ timezoneOffset?: number | undefined;
2405
+ } | undefined;
2406
+ signingKey?: string | undefined;
2407
+ cache?: object;
2478
2408
  }): Promise<void>;
2479
2409
  /**
2480
2410
  * Push a branch or tag
@@ -2525,27 +2455,27 @@ export function pull({ fs: _fs, http, onProgress, onMessage, onAuth, onAuthSucce
2525
2455
  *
2526
2456
  */
2527
2457
  export function push({ fs, http, onProgress, onMessage, onAuth, onAuthSuccess, onAuthFailure, onPrePush, dir, gitdir, ref, remoteRef, remote, url, force, delete: _delete, corsProxy, headers, cache, }: {
2528
- fs: CallbackFsClient | PromiseFsClient;
2458
+ fs: FsClient;
2529
2459
  http: HttpClient;
2530
- onProgress?: ProgressCallback;
2531
- onMessage?: MessageCallback;
2532
- onAuth?: AuthCallback;
2533
- onAuthFailure?: AuthFailureCallback;
2534
- onAuthSuccess?: AuthSuccessCallback;
2535
- onPrePush?: PrePushCallback;
2536
- dir?: string;
2537
- gitdir?: string;
2538
- ref?: string;
2539
- url?: string;
2540
- remote?: string;
2541
- remoteRef?: string;
2542
- force?: boolean;
2543
- delete?: boolean;
2544
- corsProxy?: string;
2460
+ onProgress?: ProgressCallback | undefined;
2461
+ onMessage?: MessageCallback | undefined;
2462
+ onAuth?: AuthCallback | undefined;
2463
+ onAuthFailure?: AuthFailureCallback | undefined;
2464
+ onAuthSuccess?: AuthSuccessCallback | undefined;
2465
+ onPrePush?: PrePushCallback | undefined;
2466
+ dir?: string | undefined;
2467
+ gitdir?: string | undefined;
2468
+ ref?: string | undefined;
2469
+ url?: string | undefined;
2470
+ remote?: string | undefined;
2471
+ remoteRef?: string | undefined;
2472
+ force?: boolean | undefined;
2473
+ delete?: boolean | undefined;
2474
+ corsProxy?: string | undefined;
2545
2475
  headers?: {
2546
2476
  [x: string]: string;
2547
- };
2548
- cache?: any;
2477
+ } | undefined;
2478
+ cache?: object;
2549
2479
  }): Promise<PushResult>;
2550
2480
  /**
2551
2481
  *
@@ -2582,12 +2512,12 @@ export function push({ fs, http, onProgress, onMessage, onAuth, onAuthSuccess, o
2582
2512
  *
2583
2513
  */
2584
2514
  export function readBlob({ fs, dir, gitdir, oid, filepath, cache, }: {
2585
- fs: CallbackFsClient | PromiseFsClient;
2586
- dir?: string;
2587
- gitdir?: string;
2515
+ fs: FsClient;
2516
+ dir?: string | undefined;
2517
+ gitdir?: string | undefined;
2588
2518
  oid: string;
2589
- filepath?: string;
2590
- cache?: any;
2519
+ filepath?: string | undefined;
2520
+ cache?: object;
2591
2521
  }): Promise<ReadBlobResult>;
2592
2522
  /**
2593
2523
  * Read a commit object directly
@@ -2612,11 +2542,11 @@ export function readBlob({ fs, dir, gitdir, oid, filepath, cache, }: {
2612
2542
  *
2613
2543
  */
2614
2544
  export function readCommit({ fs, dir, gitdir, oid, cache, }: {
2615
- fs: CallbackFsClient | PromiseFsClient;
2616
- dir?: string;
2617
- gitdir?: string;
2545
+ fs: FsClient;
2546
+ dir?: string | undefined;
2547
+ gitdir?: string | undefined;
2618
2548
  oid: string;
2619
- cache?: any;
2549
+ cache?: object;
2620
2550
  }): Promise<ReadCommitResult>;
2621
2551
  /**
2622
2552
  * Read the contents of a note
@@ -2632,12 +2562,12 @@ export function readCommit({ fs, dir, gitdir, oid, cache, }: {
2632
2562
  * @returns {Promise<Uint8Array>} Resolves successfully with note contents as a Buffer.
2633
2563
  */
2634
2564
  export function readNote({ fs, dir, gitdir, ref, oid, cache, }: {
2635
- fs: CallbackFsClient | PromiseFsClient;
2636
- dir?: string;
2637
- gitdir?: string;
2638
- ref?: string;
2565
+ fs: FsClient;
2566
+ dir?: string | undefined;
2567
+ gitdir?: string | undefined;
2568
+ ref?: string | undefined;
2639
2569
  oid: string;
2640
- cache?: any;
2570
+ cache?: object;
2641
2571
  }): Promise<Uint8Array>;
2642
2572
  /**
2643
2573
  *
@@ -2819,15 +2749,15 @@ export function readNote({ fs, dir, gitdir, ref, oid, cache, }: {
2819
2749
  *
2820
2750
  */
2821
2751
  export function readObject({ fs: _fs, dir, gitdir, oid, format, filepath, encoding, cache, }: {
2822
- fs: CallbackFsClient | PromiseFsClient;
2823
- dir?: string;
2824
- gitdir?: string;
2752
+ fs: FsClient;
2753
+ dir?: string | undefined;
2754
+ gitdir?: string | undefined;
2825
2755
  oid: string;
2826
- format?: "parsed" | "deflated" | "content" | "wrapped";
2827
- filepath?: string;
2828
- encoding?: string;
2829
- cache?: any;
2830
- }): Promise<ParsedBlobObject | ParsedCommitObject | ParsedTreeObject | ParsedTagObject | DeflatedObject | WrappedObject | RawObject>;
2756
+ format?: "content" | "parsed" | "deflated" | "wrapped" | undefined;
2757
+ filepath?: string | undefined;
2758
+ encoding?: string | undefined;
2759
+ cache?: object;
2760
+ }): Promise<ReadObjectResult>;
2831
2761
  /**
2832
2762
  *
2833
2763
  * @typedef {Object} ReadTagResult - The object returned has the following schema:
@@ -2851,11 +2781,11 @@ export function readObject({ fs: _fs, dir, gitdir, oid, format, filepath, encodi
2851
2781
  *
2852
2782
  */
2853
2783
  export function readTag({ fs, dir, gitdir, oid, cache, }: {
2854
- fs: CallbackFsClient | PromiseFsClient;
2855
- dir?: string;
2856
- gitdir?: string;
2784
+ fs: FsClient;
2785
+ dir?: string | undefined;
2786
+ gitdir?: string | undefined;
2857
2787
  oid: string;
2858
- cache?: any;
2788
+ cache?: object;
2859
2789
  }): Promise<ReadTagResult>;
2860
2790
  /**
2861
2791
  *
@@ -2881,12 +2811,12 @@ export function readTag({ fs, dir, gitdir, oid, cache, }: {
2881
2811
  *
2882
2812
  */
2883
2813
  export function readTree({ fs, dir, gitdir, oid, filepath, cache, }: {
2884
- fs: CallbackFsClient | PromiseFsClient;
2885
- dir?: string;
2886
- gitdir?: string;
2814
+ fs: FsClient;
2815
+ dir?: string | undefined;
2816
+ gitdir?: string | undefined;
2887
2817
  oid: string;
2888
- filepath?: string;
2889
- cache?: any;
2818
+ filepath?: string | undefined;
2819
+ cache?: object;
2890
2820
  }): Promise<ReadTreeResult>;
2891
2821
  /**
2892
2822
  * Remove a file from the git index (aka staging area)
@@ -2908,11 +2838,11 @@ export function readTree({ fs, dir, gitdir, oid, filepath, cache, }: {
2908
2838
  *
2909
2839
  */
2910
2840
  export function remove({ fs: _fs, dir, gitdir, filepath, cache, }: {
2911
- fs: CallbackFsClient | PromiseFsClient;
2912
- dir?: string;
2913
- gitdir?: string;
2841
+ fs: FsClient;
2842
+ dir?: string | undefined;
2843
+ gitdir?: string | undefined;
2914
2844
  filepath: string;
2915
- cache?: any;
2845
+ cache?: object;
2916
2846
  }): Promise<void>;
2917
2847
  /**
2918
2848
  * Remove an object note
@@ -2940,26 +2870,26 @@ export function remove({ fs: _fs, dir, gitdir, filepath, cache, }: {
2940
2870
  * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the commit object for the note removal.
2941
2871
  */
2942
2872
  export function removeNote({ fs: _fs, onSign, dir, gitdir, ref, oid, author: _author, committer: _committer, signingKey, cache, }: {
2943
- fs: CallbackFsClient | PromiseFsClient;
2944
- onSign?: SignCallback;
2945
- dir?: string;
2946
- gitdir?: string;
2947
- ref?: string;
2873
+ fs: FsClient;
2874
+ onSign?: SignCallback | undefined;
2875
+ dir?: string | undefined;
2876
+ gitdir?: string | undefined;
2877
+ ref?: string | undefined;
2948
2878
  oid: string;
2949
2879
  author?: {
2950
- name?: string;
2951
- email?: string;
2952
- timestamp?: number;
2953
- timezoneOffset?: number;
2954
- };
2880
+ name?: string | undefined;
2881
+ email?: string | undefined;
2882
+ timestamp?: number | undefined;
2883
+ timezoneOffset?: number | undefined;
2884
+ } | undefined;
2955
2885
  committer?: {
2956
- name?: string;
2957
- email?: string;
2958
- timestamp?: number;
2959
- timezoneOffset?: number;
2960
- };
2961
- signingKey?: string;
2962
- cache?: any;
2886
+ name?: string | undefined;
2887
+ email?: string | undefined;
2888
+ timestamp?: number | undefined;
2889
+ timezoneOffset?: number | undefined;
2890
+ } | undefined;
2891
+ signingKey?: string | undefined;
2892
+ cache?: object;
2963
2893
  }): Promise<string>;
2964
2894
  /**
2965
2895
  * Rename a branch
@@ -2980,12 +2910,12 @@ export function removeNote({ fs: _fs, onSign, dir, gitdir, ref, oid, author: _au
2980
2910
  *
2981
2911
  */
2982
2912
  export function renameBranch({ fs, dir, gitdir, ref, oldref, checkout, }: {
2983
- fs: CallbackFsClient | PromiseFsClient;
2984
- dir?: string;
2985
- gitdir?: string;
2913
+ fs: FsClient;
2914
+ dir?: string | undefined;
2915
+ gitdir?: string | undefined;
2986
2916
  ref: string;
2987
2917
  oldref: string;
2988
- checkout?: boolean;
2918
+ checkout?: boolean | undefined;
2989
2919
  }): Promise<void>;
2990
2920
  /**
2991
2921
  * Reset a file in the git index (aka staging area)
@@ -3008,12 +2938,12 @@ export function renameBranch({ fs, dir, gitdir, ref, oldref, checkout, }: {
3008
2938
  *
3009
2939
  */
3010
2940
  export function resetIndex({ fs: _fs, dir, gitdir, filepath, ref, cache, }: {
3011
- fs: CallbackFsClient | PromiseFsClient;
3012
- dir?: string;
3013
- gitdir?: string;
2941
+ fs: FsClient;
2942
+ dir?: string | undefined;
2943
+ gitdir?: string | undefined;
3014
2944
  filepath: string;
3015
- ref?: string;
3016
- cache?: any;
2945
+ ref?: string | undefined;
2946
+ cache?: object;
3017
2947
  }): Promise<void>;
3018
2948
  /**
3019
2949
  * Get the value of a symbolic ref or resolve a ref to its SHA-1 object id
@@ -3035,11 +2965,11 @@ export function resetIndex({ fs: _fs, dir, gitdir, filepath, ref, cache, }: {
3035
2965
  *
3036
2966
  */
3037
2967
  export function resolveRef({ fs, dir, gitdir, ref, depth, }: {
3038
- fs: CallbackFsClient | PromiseFsClient;
3039
- dir?: string;
3040
- gitdir?: string;
2968
+ fs: FsClient;
2969
+ dir?: string | undefined;
2970
+ gitdir?: string | undefined;
3041
2971
  ref: string;
3042
- depth?: number;
2972
+ depth?: number | undefined;
3043
2973
  }): Promise<string>;
3044
2974
  /**
3045
2975
  * Write an entry to the git config files.
@@ -3084,12 +3014,12 @@ export function resolveRef({ fs, dir, gitdir, ref, depth, }: {
3084
3014
  * console.log(file)
3085
3015
  */
3086
3016
  export function setConfig({ fs: _fs, dir, gitdir, path, value, append, }: {
3087
- fs: CallbackFsClient | PromiseFsClient;
3088
- dir?: string;
3089
- gitdir?: string;
3017
+ fs: FsClient;
3018
+ dir?: string | undefined;
3019
+ gitdir?: string | undefined;
3090
3020
  path: string;
3091
- value: string | number | boolean | void;
3092
- append?: boolean;
3021
+ value: string | boolean | number | void;
3022
+ append?: boolean | undefined;
3093
3023
  }): Promise<void>;
3094
3024
  /**
3095
3025
  * stash api, supports {'push' | 'pop' | 'apply' | 'drop' | 'list' | 'clear'} StashOp
@@ -3143,12 +3073,12 @@ export function setConfig({ fs: _fs, dir, gitdir, path, value, append, }: {
3143
3073
  * console.log(await git.status({ fs, dir, filepath: 'b.txt' })) // '*modified'
3144
3074
  */
3145
3075
  export function stash({ fs, dir, gitdir, op, message, refIdx, }: {
3146
- fs: CallbackFsClient | PromiseFsClient;
3147
- dir?: string;
3148
- gitdir?: string;
3149
- op?: "push" | "drop" | "pop" | "apply" | "list" | "clear";
3150
- message?: string;
3151
- refIdx?: number;
3076
+ fs: FsClient;
3077
+ dir?: string | undefined;
3078
+ gitdir?: string | undefined;
3079
+ op?: "pop" | "push" | "clear" | "drop" | "apply" | "list" | undefined;
3080
+ message?: string | undefined;
3081
+ refIdx?: number | undefined;
3152
3082
  }): Promise<string | void>;
3153
3083
  /**
3154
3084
  * Tell whether a file has been changed
@@ -3186,12 +3116,12 @@ export function stash({ fs, dir, gitdir, op, message, refIdx, }: {
3186
3116
  *
3187
3117
  */
3188
3118
  export function status({ fs: _fs, dir, gitdir, filepath, cache, }: {
3189
- fs: CallbackFsClient | PromiseFsClient;
3119
+ fs: FsClient;
3190
3120
  dir: string;
3191
- gitdir?: string;
3121
+ gitdir?: string | undefined;
3192
3122
  filepath: string;
3193
- cache?: any;
3194
- }): Promise<"modified" | "ignored" | "unmodified" | "*modified" | "*deleted" | "*added" | "absent" | "deleted" | "added" | "*unmodified" | "*absent" | "*undeleted" | "*undeletemodified">;
3123
+ cache?: object;
3124
+ }): Promise<"ignored" | "unmodified" | "*modified" | "*deleted" | "*added" | "absent" | "modified" | "deleted" | "added" | "*unmodified" | "*absent" | "*undeleted" | "*undeletemodified">;
3195
3125
  /**
3196
3126
  * Efficiently get the status of multiple files at once.
3197
3127
  *
@@ -3336,15 +3266,15 @@ export function status({ fs: _fs, dir, gitdir, filepath, cache, }: {
3336
3266
  * @see StatusRow
3337
3267
  */
3338
3268
  export function statusMatrix({ fs: _fs, dir, gitdir, ref, filepaths, filter, cache, ignored: shouldIgnore, }: {
3339
- fs: CallbackFsClient | PromiseFsClient;
3269
+ fs: FsClient;
3340
3270
  dir: string;
3341
- gitdir?: string;
3342
- ref?: string;
3343
- filepaths?: string[];
3344
- filter?: (arg0: string) => boolean;
3345
- cache?: any;
3346
- ignored?: boolean;
3347
- }): Promise<[string, 0 | 1, 0 | 1 | 2, 0 | 1 | 2 | 3][]>;
3271
+ gitdir?: string | undefined;
3272
+ ref?: string | undefined;
3273
+ filepaths?: string[] | undefined;
3274
+ filter?: ((arg0: string) => boolean) | undefined;
3275
+ cache?: object;
3276
+ ignored?: boolean | undefined;
3277
+ }): Promise<Array<StatusRow>>;
3348
3278
  /**
3349
3279
  * Create a lightweight tag
3350
3280
  *
@@ -3364,12 +3294,12 @@ export function statusMatrix({ fs: _fs, dir, gitdir, ref, filepaths, filter, cac
3364
3294
  *
3365
3295
  */
3366
3296
  export function tag({ fs: _fs, dir, gitdir, ref, object, force, }: {
3367
- fs: CallbackFsClient | PromiseFsClient;
3368
- dir?: string;
3369
- gitdir?: string;
3297
+ fs: FsClient;
3298
+ dir?: string | undefined;
3299
+ gitdir?: string | undefined;
3370
3300
  ref: string;
3371
- object?: string;
3372
- force?: boolean;
3301
+ object?: string | undefined;
3302
+ force?: boolean | undefined;
3373
3303
  }): Promise<void>;
3374
3304
  /**
3375
3305
  * Register file contents in the working tree or object database to the git index (aka staging area).
@@ -3413,16 +3343,16 @@ export function tag({ fs: _fs, dir, gitdir, ref, object, force, }: {
3413
3343
  * })
3414
3344
  */
3415
3345
  export function updateIndex({ fs: _fs, dir, gitdir, cache, filepath, oid, mode, add, remove, force, }: {
3416
- fs: CallbackFsClient | PromiseFsClient;
3346
+ fs: FsClient;
3417
3347
  dir: string;
3418
- gitdir?: string;
3348
+ gitdir?: string | undefined;
3419
3349
  filepath: string;
3420
- oid?: string;
3421
- mode?: number;
3422
- add?: boolean;
3423
- remove?: boolean;
3424
- force?: boolean;
3425
- cache?: any;
3350
+ oid?: string | undefined;
3351
+ mode?: number | undefined;
3352
+ add?: boolean | undefined;
3353
+ remove?: boolean | undefined;
3354
+ force?: boolean | undefined;
3355
+ cache?: object;
3426
3356
  }): Promise<string | void>;
3427
3357
  /**
3428
3358
  * Return the version number of isomorphic-git
@@ -3679,14 +3609,14 @@ export function version(): string;
3679
3609
  * @returns {Promise<any>} The finished tree-walking result
3680
3610
  */
3681
3611
  export function walk({ fs, dir, gitdir, trees, map, reduce, iterate, cache, }: {
3682
- fs: CallbackFsClient | PromiseFsClient;
3683
- dir?: string;
3684
- gitdir?: string;
3612
+ fs: FsClient;
3613
+ dir?: string | undefined;
3614
+ gitdir?: string | undefined;
3685
3615
  trees: Walker[];
3686
- map?: WalkerMap;
3687
- reduce?: WalkerReduce;
3688
- iterate?: WalkerIterate;
3689
- cache?: any;
3616
+ map?: WalkerMap | undefined;
3617
+ reduce?: WalkerReduce | undefined;
3618
+ iterate?: WalkerIterate | undefined;
3619
+ cache?: object;
3690
3620
  }): Promise<any>;
3691
3621
  /**
3692
3622
  * Write a blob object directly
@@ -3711,9 +3641,9 @@ export function walk({ fs, dir, gitdir, trees, map, reduce, iterate, cache, }: {
3711
3641
  *
3712
3642
  */
3713
3643
  export function writeBlob({ fs, dir, gitdir, blob }: {
3714
- fs: CallbackFsClient | PromiseFsClient;
3715
- dir?: string;
3716
- gitdir?: string;
3644
+ fs: FsClient;
3645
+ dir?: string | undefined;
3646
+ gitdir?: string | undefined;
3717
3647
  blob: Uint8Array;
3718
3648
  }): Promise<string>;
3719
3649
  /**
@@ -3730,9 +3660,9 @@ export function writeBlob({ fs, dir, gitdir, blob }: {
3730
3660
  *
3731
3661
  */
3732
3662
  export function writeCommit({ fs, dir, gitdir, commit, }: {
3733
- fs: CallbackFsClient | PromiseFsClient;
3734
- dir?: string;
3735
- gitdir?: string;
3663
+ fs: FsClient;
3664
+ dir?: string | undefined;
3665
+ gitdir?: string | undefined;
3736
3666
  commit: CommitObject;
3737
3667
  }): Promise<string>;
3738
3668
  /**
@@ -3801,14 +3731,14 @@ export function writeCommit({ fs, dir, gitdir, commit, }: {
3801
3731
  *
3802
3732
  */
3803
3733
  export function writeObject({ fs: _fs, dir, gitdir, type, object, format, oid, encoding, }: {
3804
- fs: CallbackFsClient | PromiseFsClient;
3805
- dir?: string;
3806
- gitdir?: string;
3807
- object: string | Uint8Array | TreeEntry[] | CommitObject | TagObject;
3808
- type?: "blob" | "tree" | "commit" | "tag";
3809
- format?: "parsed" | "deflated" | "content" | "wrapped";
3810
- oid?: string;
3811
- encoding?: string;
3734
+ fs: FsClient;
3735
+ dir?: string | undefined;
3736
+ gitdir?: string | undefined;
3737
+ object: string | Uint8Array | CommitObject | TreeObject | TagObject;
3738
+ type?: "blob" | "commit" | "tree" | "tag" | undefined;
3739
+ format?: "content" | "parsed" | "deflated" | "wrapped" | undefined;
3740
+ oid?: string | undefined;
3741
+ encoding?: string | undefined;
3812
3742
  }): Promise<string>;
3813
3743
  /**
3814
3744
  * Write a ref which refers to the specified SHA-1 object id, or a symbolic ref which refers to the specified ref.
@@ -3843,13 +3773,13 @@ export function writeObject({ fs: _fs, dir, gitdir, type, object, format, oid, e
3843
3773
  *
3844
3774
  */
3845
3775
  export function writeRef({ fs: _fs, dir, gitdir, ref, value, force, symbolic, }: {
3846
- fs: CallbackFsClient | PromiseFsClient;
3847
- dir?: string;
3848
- gitdir?: string;
3776
+ fs: FsClient;
3777
+ dir?: string | undefined;
3778
+ gitdir?: string | undefined;
3849
3779
  ref: string;
3850
3780
  value: string;
3851
- force?: boolean;
3852
- symbolic?: boolean;
3781
+ force?: boolean | undefined;
3782
+ symbolic?: boolean | undefined;
3853
3783
  }): Promise<void>;
3854
3784
  /**
3855
3785
  * Write an annotated tag object directly
@@ -3889,9 +3819,9 @@ export function writeRef({ fs: _fs, dir, gitdir, ref, value, force, symbolic, }:
3889
3819
  *
3890
3820
  */
3891
3821
  export function writeTag({ fs, dir, gitdir, tag }: {
3892
- fs: CallbackFsClient | PromiseFsClient;
3893
- dir?: string;
3894
- gitdir?: string;
3822
+ fs: FsClient;
3823
+ dir?: string | undefined;
3824
+ gitdir?: string | undefined;
3895
3825
  tag: TagObject;
3896
3826
  }): Promise<string>;
3897
3827
  /**
@@ -3909,10 +3839,10 @@ export function writeTag({ fs, dir, gitdir, tag }: {
3909
3839
  *
3910
3840
  */
3911
3841
  export function writeTree({ fs, dir, gitdir, tree }: {
3912
- fs: CallbackFsClient | PromiseFsClient;
3913
- dir?: string;
3914
- gitdir?: string;
3915
- tree: TreeEntry[];
3842
+ fs: FsClient;
3843
+ dir?: string | undefined;
3844
+ gitdir?: string | undefined;
3845
+ tree: TreeObject;
3916
3846
  }): Promise<string>;
3917
3847
  declare class AlreadyExistsError extends BaseError {
3918
3848
  /**
@@ -3920,17 +3850,17 @@ declare class AlreadyExistsError extends BaseError {
3920
3850
  * @param {string} where
3921
3851
  * @param {boolean} canForce
3922
3852
  */
3923
- constructor(noun: "tag" | "remote" | "note" | "branch", where: string, canForce?: boolean);
3853
+ constructor(noun: "note" | "remote" | "tag" | "branch", where: string, canForce?: boolean);
3924
3854
  code: "AlreadyExistsError";
3925
3855
  name: "AlreadyExistsError";
3926
3856
  data: {
3927
- noun: "tag" | "remote" | "note" | "branch";
3857
+ noun: "tag" | "branch" | "remote" | "note";
3928
3858
  where: string;
3929
3859
  canForce: boolean;
3930
3860
  };
3931
3861
  }
3932
3862
  declare namespace AlreadyExistsError {
3933
- export const code: 'AlreadyExistsError';
3863
+ let code: "AlreadyExistsError";
3934
3864
  }
3935
3865
  declare class AmbiguousError extends BaseError {
3936
3866
  /**
@@ -3938,7 +3868,7 @@ declare class AmbiguousError extends BaseError {
3938
3868
  * @param {string} short
3939
3869
  * @param {string[]} matches
3940
3870
  */
3941
- constructor(nouns: "refs" | "oids", short: string, matches: string[]);
3871
+ constructor(nouns: "oids" | "refs", short: string, matches: string[]);
3942
3872
  code: "AmbiguousError";
3943
3873
  name: "AmbiguousError";
3944
3874
  data: {
@@ -3948,7 +3878,7 @@ declare class AmbiguousError extends BaseError {
3948
3878
  };
3949
3879
  }
3950
3880
  declare namespace AmbiguousError {
3951
- const code_1: 'AmbiguousError';
3881
+ let code_1: "AmbiguousError";
3952
3882
  export { code_1 as code };
3953
3883
  }
3954
3884
  declare class CheckoutConflictError extends BaseError {
@@ -3963,7 +3893,7 @@ declare class CheckoutConflictError extends BaseError {
3963
3893
  };
3964
3894
  }
3965
3895
  declare namespace CheckoutConflictError {
3966
- const code_2: 'CheckoutConflictError';
3896
+ let code_2: "CheckoutConflictError";
3967
3897
  export { code_2 as code };
3968
3898
  }
3969
3899
  declare class CommitNotFetchedError extends BaseError {
@@ -3980,25 +3910,27 @@ declare class CommitNotFetchedError extends BaseError {
3980
3910
  };
3981
3911
  }
3982
3912
  declare namespace CommitNotFetchedError {
3983
- const code_3: 'CommitNotFetchedError';
3913
+ let code_3: "CommitNotFetchedError";
3984
3914
  export { code_3 as code };
3985
3915
  }
3986
3916
  declare class EmptyServerResponseError extends BaseError {
3917
+ constructor();
3987
3918
  code: "EmptyServerResponseError";
3988
3919
  name: "EmptyServerResponseError";
3989
3920
  data: {};
3990
3921
  }
3991
3922
  declare namespace EmptyServerResponseError {
3992
- const code_4: 'EmptyServerResponseError';
3923
+ let code_4: "EmptyServerResponseError";
3993
3924
  export { code_4 as code };
3994
3925
  }
3995
3926
  declare class FastForwardError extends BaseError {
3927
+ constructor();
3996
3928
  code: "FastForwardError";
3997
3929
  name: "FastForwardError";
3998
3930
  data: {};
3999
3931
  }
4000
3932
  declare namespace FastForwardError {
4001
- const code_5: 'FastForwardError';
3933
+ let code_5: "FastForwardError";
4002
3934
  export { code_5 as code };
4003
3935
  }
4004
3936
  declare class GitPushError extends BaseError {
@@ -4015,7 +3947,7 @@ declare class GitPushError extends BaseError {
4015
3947
  };
4016
3948
  }
4017
3949
  declare namespace GitPushError {
4018
- const code_6: 'GitPushError';
3950
+ let code_6: "GitPushError";
4019
3951
  export { code_6 as code };
4020
3952
  }
4021
3953
  declare class HttpError extends BaseError {
@@ -4034,7 +3966,7 @@ declare class HttpError extends BaseError {
4034
3966
  };
4035
3967
  }
4036
3968
  declare namespace HttpError {
4037
- const code_7: 'HttpError';
3969
+ let code_7: "HttpError";
4038
3970
  export { code_7 as code };
4039
3971
  }
4040
3972
  declare class InternalError extends BaseError {
@@ -4049,22 +3981,22 @@ declare class InternalError extends BaseError {
4049
3981
  };
4050
3982
  }
4051
3983
  declare namespace InternalError {
4052
- const code_8: 'InternalError';
3984
+ let code_8: "InternalError";
4053
3985
  export { code_8 as code };
4054
3986
  }
4055
3987
  declare class InvalidFilepathError extends BaseError {
4056
3988
  /**
4057
3989
  * @param {'leading-slash'|'trailing-slash'|'directory'} [reason]
4058
3990
  */
4059
- constructor(reason?: "leading-slash" | "trailing-slash" | "directory" | undefined);
3991
+ constructor(reason?: "leading-slash" | "trailing-slash" | "directory");
4060
3992
  code: "InvalidFilepathError";
4061
3993
  name: "InvalidFilepathError";
4062
3994
  data: {
4063
- reason: "leading-slash" | "trailing-slash" | "directory" | undefined;
3995
+ reason: "directory" | "leading-slash" | "trailing-slash" | undefined;
4064
3996
  };
4065
3997
  }
4066
3998
  declare namespace InvalidFilepathError {
4067
- const code_9: 'InvalidFilepathError';
3999
+ let code_9: "InvalidFilepathError";
4068
4000
  export { code_9 as code };
4069
4001
  }
4070
4002
  declare class InvalidOidError extends BaseError {
@@ -4079,7 +4011,7 @@ declare class InvalidOidError extends BaseError {
4079
4011
  };
4080
4012
  }
4081
4013
  declare namespace InvalidOidError {
4082
- const code_10: 'InvalidOidError';
4014
+ let code_10: "InvalidOidError";
4083
4015
  export { code_10 as code };
4084
4016
  }
4085
4017
  declare class InvalidRefNameError extends BaseError {
@@ -4097,7 +4029,7 @@ declare class InvalidRefNameError extends BaseError {
4097
4029
  };
4098
4030
  }
4099
4031
  declare namespace InvalidRefNameError {
4100
- const code_11: 'InvalidRefNameError';
4032
+ let code_11: "InvalidRefNameError";
4101
4033
  export { code_11 as code };
4102
4034
  }
4103
4035
  declare class MaxDepthError extends BaseError {
@@ -4112,16 +4044,17 @@ declare class MaxDepthError extends BaseError {
4112
4044
  };
4113
4045
  }
4114
4046
  declare namespace MaxDepthError {
4115
- const code_12: 'MaxDepthError';
4047
+ let code_12: "MaxDepthError";
4116
4048
  export { code_12 as code };
4117
4049
  }
4118
4050
  declare class MergeNotSupportedError extends BaseError {
4051
+ constructor();
4119
4052
  code: "MergeNotSupportedError";
4120
4053
  name: "MergeNotSupportedError";
4121
4054
  data: {};
4122
4055
  }
4123
4056
  declare namespace MergeNotSupportedError {
4124
- const code_13: 'MergeNotSupportedError';
4057
+ let code_13: "MergeNotSupportedError";
4125
4058
  export { code_13 as code };
4126
4059
  }
4127
4060
  declare class MergeConflictError extends BaseError {
@@ -4131,7 +4064,7 @@ declare class MergeConflictError extends BaseError {
4131
4064
  * @param {Array<string>} deleteByUs
4132
4065
  * @param {Array<string>} deleteByTheirs
4133
4066
  */
4134
- constructor(filepaths: string[], bothModified: string[], deleteByUs: string[], deleteByTheirs: string[]);
4067
+ constructor(filepaths: Array<string>, bothModified: Array<string>, deleteByUs: Array<string>, deleteByTheirs: Array<string>);
4135
4068
  code: "MergeConflictError";
4136
4069
  name: "MergeConflictError";
4137
4070
  data: {
@@ -4142,7 +4075,7 @@ declare class MergeConflictError extends BaseError {
4142
4075
  };
4143
4076
  }
4144
4077
  declare namespace MergeConflictError {
4145
- const code_14: 'MergeConflictError';
4078
+ let code_14: "MergeConflictError";
4146
4079
  export { code_14 as code };
4147
4080
  }
4148
4081
  declare class MissingNameError extends BaseError {
@@ -4157,7 +4090,7 @@ declare class MissingNameError extends BaseError {
4157
4090
  };
4158
4091
  }
4159
4092
  declare namespace MissingNameError {
4160
- const code_15: 'MissingNameError';
4093
+ let code_15: "MissingNameError";
4161
4094
  export { code_15 as code };
4162
4095
  }
4163
4096
  declare class MissingParameterError extends BaseError {
@@ -4172,7 +4105,7 @@ declare class MissingParameterError extends BaseError {
4172
4105
  };
4173
4106
  }
4174
4107
  declare namespace MissingParameterError {
4175
- const code_16: 'MissingParameterError';
4108
+ let code_16: "MissingParameterError";
4176
4109
  export { code_16 as code };
4177
4110
  }
4178
4111
  declare class MultipleGitError extends BaseError {
@@ -4189,7 +4122,7 @@ declare class MultipleGitError extends BaseError {
4189
4122
  errors: Error[];
4190
4123
  }
4191
4124
  declare namespace MultipleGitError {
4192
- const code_17: 'MultipleGitError';
4125
+ let code_17: "MultipleGitError";
4193
4126
  export { code_17 as code };
4194
4127
  }
4195
4128
  declare class NoRefspecError extends BaseError {
@@ -4204,7 +4137,7 @@ declare class NoRefspecError extends BaseError {
4204
4137
  };
4205
4138
  }
4206
4139
  declare namespace NoRefspecError {
4207
- const code_18: 'NoRefspecError';
4140
+ let code_18: "NoRefspecError";
4208
4141
  export { code_18 as code };
4209
4142
  }
4210
4143
  declare class NotFoundError extends BaseError {
@@ -4219,7 +4152,7 @@ declare class NotFoundError extends BaseError {
4219
4152
  };
4220
4153
  }
4221
4154
  declare namespace NotFoundError {
4222
- const code_19: 'NotFoundError';
4155
+ let code_19: "NotFoundError";
4223
4156
  export { code_19 as code };
4224
4157
  }
4225
4158
  declare class ObjectTypeError extends BaseError {
@@ -4229,18 +4162,18 @@ declare class ObjectTypeError extends BaseError {
4229
4162
  * @param {'blob'|'commit'|'tag'|'tree'} expected
4230
4163
  * @param {string} [filepath]
4231
4164
  */
4232
- constructor(oid: string, actual: "blob" | "tree" | "commit" | "tag", expected: "blob" | "tree" | "commit" | "tag", filepath?: string | undefined);
4165
+ constructor(oid: string, actual: "blob" | "commit" | "tag" | "tree", expected: "blob" | "commit" | "tag" | "tree", filepath?: string);
4233
4166
  code: "ObjectTypeError";
4234
4167
  name: "ObjectTypeError";
4235
4168
  data: {
4236
4169
  oid: string;
4237
- actual: "blob" | "tree" | "commit" | "tag";
4238
- expected: "blob" | "tree" | "commit" | "tag";
4170
+ actual: "blob" | "commit" | "tree" | "tag";
4171
+ expected: "blob" | "commit" | "tree" | "tag";
4239
4172
  filepath: string | undefined;
4240
4173
  };
4241
4174
  }
4242
4175
  declare namespace ObjectTypeError {
4243
- const code_20: 'ObjectTypeError';
4176
+ let code_20: "ObjectTypeError";
4244
4177
  export { code_20 as code };
4245
4178
  }
4246
4179
  declare class ParseError extends BaseError {
@@ -4257,7 +4190,7 @@ declare class ParseError extends BaseError {
4257
4190
  };
4258
4191
  }
4259
4192
  declare namespace ParseError {
4260
- const code_21: 'ParseError';
4193
+ let code_21: "ParseError";
4261
4194
  export { code_21 as code };
4262
4195
  }
4263
4196
  declare class PushRejectedError extends BaseError {
@@ -4272,7 +4205,7 @@ declare class PushRejectedError extends BaseError {
4272
4205
  };
4273
4206
  }
4274
4207
  declare namespace PushRejectedError {
4275
- const code_22: 'PushRejectedError';
4208
+ let code_22: "PushRejectedError";
4276
4209
  export { code_22 as code };
4277
4210
  }
4278
4211
  declare class RemoteCapabilityError extends BaseError {
@@ -4289,7 +4222,7 @@ declare class RemoteCapabilityError extends BaseError {
4289
4222
  };
4290
4223
  }
4291
4224
  declare namespace RemoteCapabilityError {
4292
- const code_23: 'RemoteCapabilityError';
4225
+ let code_23: "RemoteCapabilityError";
4293
4226
  export { code_23 as code };
4294
4227
  }
4295
4228
  declare class SmartHttpError extends BaseError {
@@ -4306,7 +4239,7 @@ declare class SmartHttpError extends BaseError {
4306
4239
  };
4307
4240
  }
4308
4241
  declare namespace SmartHttpError {
4309
- const code_24: 'SmartHttpError';
4242
+ let code_24: "SmartHttpError";
4310
4243
  export { code_24 as code };
4311
4244
  }
4312
4245
  declare class UnknownTransportError extends BaseError {
@@ -4315,7 +4248,7 @@ declare class UnknownTransportError extends BaseError {
4315
4248
  * @param {string} transport
4316
4249
  * @param {string} [suggestion]
4317
4250
  */
4318
- constructor(url: string, transport: string, suggestion?: string | undefined);
4251
+ constructor(url: string, transport: string, suggestion?: string);
4319
4252
  code: "UnknownTransportError";
4320
4253
  name: "UnknownTransportError";
4321
4254
  data: {
@@ -4325,7 +4258,7 @@ declare class UnknownTransportError extends BaseError {
4325
4258
  };
4326
4259
  }
4327
4260
  declare namespace UnknownTransportError {
4328
- const code_25: 'UnknownTransportError';
4261
+ let code_25: "UnknownTransportError";
4329
4262
  export { code_25 as code };
4330
4263
  }
4331
4264
  declare class UnsafeFilepathError extends BaseError {
@@ -4340,7 +4273,7 @@ declare class UnsafeFilepathError extends BaseError {
4340
4273
  };
4341
4274
  }
4342
4275
  declare namespace UnsafeFilepathError {
4343
- const code_26: 'UnsafeFilepathError';
4276
+ let code_26: "UnsafeFilepathError";
4344
4277
  export { code_26 as code };
4345
4278
  }
4346
4279
  declare class UrlParseError extends BaseError {
@@ -4355,23 +4288,24 @@ declare class UrlParseError extends BaseError {
4355
4288
  };
4356
4289
  }
4357
4290
  declare namespace UrlParseError {
4358
- const code_27: 'UrlParseError';
4291
+ let code_27: "UrlParseError";
4359
4292
  export { code_27 as code };
4360
4293
  }
4361
4294
  declare class UserCanceledError extends BaseError {
4295
+ constructor();
4362
4296
  code: "UserCanceledError";
4363
4297
  name: "UserCanceledError";
4364
4298
  data: {};
4365
4299
  }
4366
4300
  declare namespace UserCanceledError {
4367
- const code_28: 'UserCanceledError';
4301
+ let code_28: "UserCanceledError";
4368
4302
  export { code_28 as code };
4369
4303
  }
4370
4304
  declare class UnmergedPathsError extends BaseError {
4371
4305
  /**
4372
4306
  * @param {Array<string>} filepaths
4373
4307
  */
4374
- constructor(filepaths: string[]);
4308
+ constructor(filepaths: Array<string>);
4375
4309
  code: "UnmergedPathsError";
4376
4310
  name: "UnmergedPathsError";
4377
4311
  data: {
@@ -4379,7 +4313,7 @@ declare class UnmergedPathsError extends BaseError {
4379
4313
  };
4380
4314
  }
4381
4315
  declare namespace UnmergedPathsError {
4382
- const code_29: 'UnmergedPathsError';
4316
+ let code_29: "UnmergedPathsError";
4383
4317
  export { code_29 as code };
4384
4318
  }
4385
4319
  declare class IndexResetError extends BaseError {
@@ -4394,7 +4328,7 @@ declare class IndexResetError extends BaseError {
4394
4328
  };
4395
4329
  }
4396
4330
  declare namespace IndexResetError {
4397
- const code_30: 'IndexResetError';
4331
+ let code_30: "IndexResetError";
4398
4332
  export { code_30 as code };
4399
4333
  }
4400
4334
  declare class NoCommitError extends BaseError {
@@ -4409,7 +4343,7 @@ declare class NoCommitError extends BaseError {
4409
4343
  };
4410
4344
  }
4411
4345
  declare namespace NoCommitError {
4412
- const code_31: 'NoCommitError';
4346
+ let code_31: "NoCommitError";
4413
4347
  export { code_31 as code };
4414
4348
  }
4415
4349
  /**