-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathindex.d.ts
More file actions
9309 lines (9133 loc) · 257 KB
/
index.d.ts
File metadata and controls
9309 lines (9133 loc) · 257 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* auto-generated by NAPI-RS */
/* eslint-disable */
/**
* A structure to represent an annotated commit, the input to merge and rebase.
*
* An annotated commit contains information about how it was looked up, which
* may be useful for functions like merge or rebase to provide context to the
* operation.
*/
export declare class AnnotatedCommit {
/**
* Gets the commit ID that the given Annotated Commit refers to.
*
* @category AnnotatedCommit/Methods
* @signature
* ```ts
* class AnnotatedCommit {
* id(): string;
* }
* ```
*
* @returns The commit ID that this Annotated Commit refers to.
*/
id(): string
/**
* Get the refname that the given Annotated Commit refers to.
*
* @category AnnotatedCommit/Methods
* @signature
* ```ts
* class AnnotatedCommit {
* refname(): string | null;
* }
* ```
*
* @returns The refname that this Annotated Commit refers to. If this created from a reference,
* the return value is `null`.
* @throws Throws error if the refname is not valid utf-8.
*/
refname(): string | null
}
/** A wrapper around git2::Blame providing Node.js bindings */
export declare class Blame {
/**
* Gets the number of hunks in the blame result
*
* @category Blame/Methods
* @signature
* ```ts
* class Blame {
* getHunkCount(): number;
* }
* ```
*
* @returns The number of hunks in the blame result
*/
getHunkCount(): number
/**
* Checks if the blame result is empty
*
* @category Blame/Methods
* @signature
* ```ts
* class Blame {
* isEmpty(): boolean;
* }
* ```
*
* @returns True if the blame result contains no hunks
*/
isEmpty(): boolean
/**
* Gets blame information for the specified index
*
* @category Blame/Methods
* @signature
* ```ts
* class Blame {
* getHunkByIndex(index: number): BlameHunk;
* }
* ```
*
* @param {number} index - Index of the hunk to get (0-based)
* @returns Blame information for the specified index
* @throws If no hunk is found at the index
*/
getHunkByIndex(index: number): BlameHunk
/**
* Gets blame information for the specified line
*
* @category Blame/Methods
* @signature
* ```ts
* class Blame {
* getHunkByLine(line: number): BlameHunk;
* }
* ```
*
* @param {number} line - Line number to get blame information for (1-based)
* @returns Blame information for the specified line
* @throws If no hunk is found for the line
*/
getHunkByLine(line: number): BlameHunk
/**
* Gets all blame hunks as an iterator
*
* @category Blame/Methods
* @signature
* ```ts
* class Blame {
* iter(): Generator<BlameHunk>;
* }
* ```
*
* @returns Iterator of all blame hunks
* @example
* ```ts
* // Using for...of loop
* for (const hunk of blame.iter()) {
* console.log(hunk.finalCommitId);
* }
*
* // Using spread operator to collect all hunks
* const hunks = [...blame.iter()];
* ```
*/
iter(): BlameHunks
/**
* Collects blame hunks by scanning file lines as an iterator
*
* @category Blame/Methods
* @signature
* ```ts
* class Blame {
* iterByLine(): Generator<BlameHunk>;
* }
* ```
*
* @returns Iterator of blame hunks collected by line scanning
* @example
* ```ts
* // Using for...of loop
* for (const hunk of blame.iterByLine()) {
* console.log(hunk.finalCommitId);
* }
*
* // Using spread operator to collect all hunks
* const hunks = [...blame.iterByLine()];
* ```
*/
iterByLine(): BlameHunksByLine
/**
* Generates blame information from an in-memory buffer
*
* @category Blame/Methods
* @signature
* ```ts
* class Blame {
* buffer(buffer: Buffer): Blame;
* }
* ```
*
* @example
* ```ts
* const buffer = Buffer.from('modified content');
* const bufferBlame = blame.buffer(buffer);
* ```
*
* @param {Buffer} buffer - Buffer containing file content to blame
* @returns A new Blame object for the buffer content
*/
buffer(buffer: Buffer): Blame
}
/**
* An iterator over blame hunks.
*
* This type extends JavaScript's `Iterator`, and so has the iterator helper
* methods. It may extend the upcoming TypeScript `Iterator` class in the future.
*
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Iterator#iterator_helper_methods
* @see https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-6.html#iterator-helper-methods
*/
export declare class BlameHunks extends Iterator<BlameHunk, void, void> {
next(value?: void): IteratorResult<BlameHunk, void>
}
/**
* Iterator over blame hunks collected line by line.
*
* This type extends JavaScript's `Iterator`, and so has the iterator helper
* methods. It may extend the upcoming TypeScript `Iterator` class in the future.
*
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Iterator#iterator_helper_methods
* @see https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-6.html#iterator-helper-methods
*/
export declare class BlameHunksByLine extends Iterator<BlameHunk, void, void> {
next(value?: void): IteratorResult<BlameHunk, void>
}
/**
* A class to represent a git [blob][1].
* [1]: https://git-scm.com/book/en/Git-Internals-Git-Objects
*/
export declare class Blob {
/**
* Get the id (SHA1) of a repository blob.
*
* @category Blob/Methods
*
* @signature
* ```ts
* class Blob {
* id(): string;
* }
* ```
*
* @returns ID(SHA1) of a repository blob.
*/
id(): string
/**
* Determine if the blob content is most certainly binary or not.
*
* @category Blob/Methods
*
* @signature
* ```ts
* class Blob {
* isBinary(): boolean;
* }
* ```
*
* @returns `true` if blob content is binary.
*/
isBinary(): boolean
/**
* Get the content of this blob.
*
* @category Blob/Methods
*
* @signature
* ```ts
* class Blob {
* content(): Uint8Array;
* }
* ```
*
* @returns Content of this blob.
*/
content(): Uint8Array
/**
* Get the size in bytes of the contents of this blob.
*
* @category Blob/Methods
*
* @signature
* ```ts
* class Blob {
* size(): bigint;
* }
* ```
*
* @returns Size in bytes of the contents of this blob.
*/
size(): bigint
}
/**
* A structure to represent a git [branch][1]
*
* A branch is currently just a wrapper to an underlying `Reference`. The
* reference can be accessed through the `get` and `into_reference` methods.
*
* [1]: http://git-scm.com/book/en/Git-Branching-What-a-Branch-Is
*/
export declare class Branch {
/**
* Get the OID pointed to by a reference which is this branch.
*
* @category Branch/Methods
* @signature
* ```ts
* class Branch {
* referenceTarget(): string | null;
* }
* ```
*
* @returns The OID pointed to by a reference which is this branch.
*/
referenceTarget(): string | null
/**
* Delete an existing branch reference.
*
* @category Branch/Methods
* @signature
* ```ts
* class Branch {
* delete(): void;
* }
* ```
*/
delete(): void
/**
* Determine if the current local branch is pointed at by `HEAD`.
*
* @category Branch/Methods
* @signature
* ```ts
* class Branch {
* isHead(): boolean;
* }
* ```
*
* @returns Returns `true` if the current local branch is pointed at by `HEAD`.
*/
isHead(): boolean
/**
* Move/rename an existing local branch reference.
*
* @category Branch/Methods
* @signature
* ```ts
* class Branch {
* rename(newBranchName: string, options?: BranchRenameOptions | null | undefined): Branch;
* }
* ```
*
* @param {string} newBranchName - Branch name to move/rename.
* @param {BranchRenameOptions} [options] - Options for move/rename branch.
* @returns Move/renamed branch.
*/
rename(newBranchName: string, options?: BranchRenameOptions | undefined | null): Branch
/**
* Return the name of the given local or remote branch.
*
* @category Branch/Methods
* @signature
* ```ts
* class Branch {
* name(): string;
* }
* ```
*
* @returns The name of the given local or remote branch.
* @throws If the name is not valid utf-8.
*/
name(): string
/**
* Return the reference supporting the remote tracking branch, given a
* local branch reference.
*
* @category Branch/Methods
* @signature
* ```ts
* class Branch {
* findUpstream(): Branch | null;
* }
* ```
*
* @returns The reference supporting the remote tacking branch.
*/
findUpstream(): Branch | null
/**
* Return the reference supporting the remote tracking branch, given a
* local branch reference.
*
* @category Branch/Methods
* @signature
* ```ts
* class Branch {
* getUpstream(): Branch;
* }
* ```
*
* @returns The reference supporting the remote tacking branch.
* @throws Throws error if upstream does not exist.
*/
getUpstream(): Branch
/**
* Set the upstream configuration for a given local branch.
*
* @category Branch/Methods
* @signature
* ```ts
* class Branch {
* setUpstream(upstreamName: string): void;
* }
* ```
*
* @param {string} upstreamName - Branch name to set as upstream.
*/
setUpstream(upstreamName: string): void
/**
* Unset the upstream configuration for a given local branch.
*
* @category Branch/Methods
* @signature
* ```ts
* class Branch {
* unsetUpstream(): void;
* }
* ```
*/
unsetUpstream(): void
}
/**
* An iterator over the branches inside of a repository.
*
* This type extends JavaScript's `Iterator`, and so has the iterator helper
* methods. It may extend the upcoming TypeScript `Iterator` class in the future.
*
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Iterator#iterator_helper_methods
* @see https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-6.html#iterator-helper-methods
*/
export declare class Branches extends Iterator<BranchesItem, void, void> {
next(value?: void): IteratorResult<BranchesItem, void>
}
/** A class to represent a git commit. */
export declare class Commit {
/**
* Get the id (SHA1) of a repository commit
*
* @category Commit/Methods
*
* @signature
* ```ts
* class Commit {
* id(): string;
* }
* ```
*
* @returns ID(SHA1) of a repository commit.
*/
id(): string
/**
* Get the author of this commit.
*
* @category Commit/Methods
*
* @signature
* ```ts
* class Commit {
* author(): Signature;
* }
* ```
*
* @returns Author signature of this commit.
*/
author(): Signature
/**
* Get the committer of this commit.
*
* @category Commit/Methods
*
* @signature
* ```ts
* class Commit {
* committer(): Signature;
* }
* ```
*
* @returns Committer signature of this commit.
*/
committer(): Signature
/**
* Get the full message of a commit.
*
* The returned message will be slightly prettified by removing any
* potential leading newlines.
*
* Throws error if the message is not valid utf-8.
*
* @category Commit/Methods
*
* @signature
* ```ts
* class Commit {
* message(): string;
* }
* ```
*
* @returns Full message of this commit.
* @throws If the message is not valid utf-8.
*/
message(): string
/**
* Get the short "summary" of the git commit message.
*
* The returned message is the summary of the commit, comprising the first
* paragraph of the message with whitespace trimmed and squashed.
*
* Throws error if the summary is not valid utf-8.
*
* @category Commit/Methods
*
* @signature
* ```ts
* class Commit {
* summary(): string | null;
* }
* ```
*
* @returns Short summary of this commit message.
* @throws If the summary is not valid utf-8.
*/
summary(): string | null
/**
* Get the long "body" of the git commit message.
*
* The returned message is the body of the commit, comprising everything
* but the first paragraph of the message. Leading and trailing whitespaces
* are trimmed.
*
* Throws error if the summary is not valid utf-8.
*
* @category Commit/Methods
*
* @signature
* ```ts
* class Commit {
* body(): string | null;
* }
* ```
*
* @returns Long body of this commit message.
* @throws If the body is not valid utf-8.
*/
body(): string | null
/**
* Get the commit time (i.e. committer time) of a commit.
*
* @category Commit/Methods
*
* @signature
* ```ts
* class Commit {
* time(): Date;
* }
* ```
*
* @returns Commit time of a commit.
*/
time(): Date
/**
* Get the id of the tree pointed to by this commit.
*
* No attempts are made to fetch an object from the ODB.
*
* @category Commit/Methods
*
* @signature
* ```ts
* class Commit {
* treeId(): string;
* }
* ```
*
* @returns Get the id of the tree pointed to by a commit.
*/
treeId(): string
/**
* Get the tree pointed to by a commit.
*
* @category Commit/Methods
*
* @signature
* ```ts
* class Commit {
* tree(): Tree;
* }
* ```
*
* @returns Tree pointed to by a commit.
*/
tree(): Tree
/**
* Casts this Commit to be usable as an `GitObject`.
*
* @category Commit/Methods
*
* @signature
* ```ts
* class Commit {
* asObject(): GitObject;
* }
* ```
*
* @returns `GitObject` that casted from this commit.
*/
asObject(): GitObject
/**
* Amend this existing commit with all non-nullable values
*
* This creates a new commit that is exactly the same as the old commit,
* except that any non-nullable values will be updated. The new commit has
* the same parents as the old commit.
*
* @category Commit/Methods
*
* @signature
* ```ts
* class Commit {
* amend(options?: AmendOptions, tree?: Tree): string;
* }
* ```
*
* @param {AmendOptions} [options] - Options for amending commit.
* @param {Tree} [tree] - Tree to use for amending commit.
* @returns ID(SHA1) of amended commit.
*/
amend(options?: AmendOptions | undefined | null, tree?: Tree | undefined | null): string
/**
* Get the author of this commit, using the mailmap to map it to the canonical name and email.
*
* @category Commit/Methods
*
* @signature
* ```ts
* class Commit {
* authorWithMailmap(mailmap: Mailmap): Signature;
* }
* ```
*
* @param {Mailmap} mailmap - The mailmap to use for mapping
* @returns Author signature of this commit with mapping applied
* @throws An error if the operation failed.
*/
authorWithMailmap(mailmap: Mailmap): Signature
/**
* Get the committer of this commit, using the mailmap to map it to the canonical name and email.
*
* @category Commit/Methods
*
* @signature
* ```ts
* class Commit {
* committerWithMailmap(mailmap: Mailmap): Signature;
* }
* ```
*
* @param {Mailmap} mailmap - The mailmap to use for mapping
* @returns Committer signature of this commit with mapping applied
* @throws An error if the operation failed.
*/
committerWithMailmap(mailmap: Mailmap): Signature
}
export declare class Config {
/**
* Delete a config variable from the config file with the highest level
* (usually the local one).
*
* @category Config/Methods
* @signature
* ```ts
* class Config {
* remove(name: string): void;
* }
* ```
*
* @param {string} name - The name of config entry.
*/
remove(name: string): void
/**
* Remove multivar config variables in the config file with the highest level (usually the
* local one).
*
* @category Config/Methods
* @signature
* ```ts
* class Config {
* removeMultivar(name: string, regexp: string): void;
* }
* ```
*
* @param {string} name - The name of config entry.
* @param {string} regexp - The regular expression is applied case-sensitively on the value.
*/
removeMultivar(name: string, regexp: string): void
/**
* Get the value of a boolean config variable.
*
* All config files will be looked into, in the order of their defined
* level. A higher level means a higher priority. The first occurrence of
* the variable will be returned here.
*
* @category Config/Methods
* @signature
* ```ts
* class Config {
* getBool(name: string): boolean;
* }
* ```
*
* @param {string} name - The name of config entry.
* @returns The value of a boolean config variable.
*/
getBool(name: string): boolean
/**
* Find the value of a boolean config variable.
*
* All config files will be looked into, in the order of their defined
* level. A higher level means a higher priority. The first occurrence of
* the variable will be returned here.
*
* @category Config/Methods
* @signature
* ```ts
* class Config {
* findBool(name: string): boolean | null;
* }
* ```
*
* @param {string} name - The name of config entry.
* @returns The value of a boolean config variable.
*/
findBool(name: string): boolean | null
/**
* Get the value of an integer config variable.
*
* All config files will be looked into, in the order of their defined
* level. A higher level means a higher priority. The first occurrence of
* the variable will be returned here.
*
* @category Config/Methods
* @signature
* ```ts
* class Config {
* getI32(name: string): number;
* }
* ```
*
* @param {string} name - The name of config entry.
* @returns The value of an integer config variable.
*/
getI32(name: string): number
/**
* Find the value of an integer config variable.
*
* All config files will be looked into, in the order of their defined
* level. A higher level means a higher priority. The first occurrence of
* the variable will be returned here.
*
* @category Config/Methods
* @signature
* ```ts
* class Config {
* findI32(name: string): number | null;
* }
* ```
*
* @param {string} name - The name of config entry.
* @returns The value of an integer config variable.
*/
findI32(name: string): number | null
/**
* Get the value of an integer config variable.
*
* All config files will be looked into, in the order of their defined
* level. A higher level means a higher priority. The first occurrence of
* the variable will be returned here.
*
* @category Config/Methods
* @signature
* ```ts
* class Config {
* getI64(name: string): number;
* }
* ```
*
* @param {string} name - The name of config entry.
* @returns The value of an integer config variable.
*/
getI64(name: string): number
/**
* Find the value of an integer config variable.
*
* All config files will be looked into, in the order of their defined
* level. A higher level means a higher priority. The first occurrence of
* the variable will be returned here.
*
* @category Config/Methods
* @signature
* ```ts
* class Config {
* findI64(name: string): number | null;
* }
* ```
*
* @param {string} name - The name of config entry.
* @returns The value of an integer config variable.
*/
findI64(name: string): number | null
/**
* Get the value of a string config variable as a byte slice.
*
* @category Config/Methods
* @signature
* ```ts
* class Config {
* getBytes(name: string): Uint8Array;
* }
* ```
*
* @param {string} name - The name of config entry.
* @returns The value of a string config variable as a byte slice.
*/
getBytes(name: string): Uint8Array
/**
* Find the value of a string config variable as a byte slice.
*
* @category Config/Methods
* @signature
* ```ts
* class Config {
* findBytes(name: string): Uint8Array | null;
* }
* ```
*
* @param {string} name - The name of config entry.
* @returns The value of a string config variable as a byte slice.
*/
findBytes(name: string): Uint8Array | null
/**
* Get the value of a string config variable as an owned string.
*
* All config files will be looked into, in the order of their
* defined level. A higher level means a higher priority. The
* first occurrence of the variable will be returned here.
*
* @category Config/Methods
* @signature
* ```ts
* class Config {
* getString(name: string): string;
* }
* ```
*
* @param {string} name - The name of config entry.
* @returns The value of a string config variable.
* @throws An error will be returned if the config value is not valid utf-8.
*/
getString(name: string): string
/**
* Find the value of a string config variable as an owned string.
*
* All config files will be looked into, in the order of their
* defined level. A higher level means a higher priority. The
* first occurrence of the variable will be returned here.
*
* @category Config/Methods
* @signature
* ```ts
* class Config {
* findString(name: string): string | null;
* }
* ```
*
* @param {string} name - The name of config entry.
* @returns The value of a string config variable.
*/
findString(name: string): string | null
/**
* Get the value of a path config variable.
*
* A leading '~' will be expanded to the global search path (which
* defaults to the user's home directory but can be overridden via
* [`git_libgit2_opts`][1].
*
* [1]: https://libgit2.org/docs/reference/v1.9.0/common/git_libgit2_opts.html
*
* All config files will be looked into, in the order of their
* defined level. A higher level means a higher priority. The
* first occurrence of the variable will be returned here.
*
* @category Config/Methods
* @signature
* ```ts
* class Config {
* getPath(name: string): string;
* }
* ```
*
* @param {string} name - The name of config entry.
* @returns The value of a path config variable.
*/
getPath(name: string): string
/**
* Get the entry for a config variable.
*
* @category Config/Methods
* @signature
* ```ts
* class Config {
* getEntry(name: string): ConfigEntry;
* }
* ```
*
* @param {string} name - The name of config entry.
* @returns `ConfigEntry` object representing a certain entry owned by a `Config` instance.
*/
getEntry(name: string): ConfigEntry
/**
* Find the entry for a config variable.
*
* @category Config/Methods
* @signature
* ```ts
* class Config {
* findEntry(name: string): ConfigEntry | null;
* }
* ```
*
* @param {string} name - The name of config entry.
* @returns `ConfigEntry` object representing a certain entry owned by a `Config` instance.
*/
findEntry(name: string): ConfigEntry | null
/**
* Iterate over all the config variables.
*
* @category Config/Methods
* @signature
* ```ts
* class Config {
* entries(glob?: string): ConfigEntries;
* }
* ```
*
* @param {string} [glob] - If `glob` is provided, then the iterator will only iterate over all
* variables whose name matches the pattern.
* The regular expression is applied case-sensitively on the normalized form of
* the variable name: the section and variable parts are lower-cased. The
* subsection is left unchanged.
*
* @returns An iterator over the `ConfigEntry` values of a config.
* @example
*
* ```ts
* import { openDefaultConfig } from 'es-git';
*
* const config = openDefaultConfig();
* for (const entry of config.entries()) {
* console.log(entry.name, entry.value);
* }
* ```
*/
entries(glob?: string | undefined | null): ConfigEntries
/**
* Iterate over the values of a multivar.
*
* @category Config/Methods
* @signature
* ```ts
* class Config {
* multivar(name: string, regexp?: string): ConfigEntries;
* }
* ```
*
* @param {string} name - The name of config entry.
* @param {string} [regexp] - If `regexp` is provided, then the iterator will only iterate over all
* values which match the pattern.
* The regular expression is applied case-sensitively on the normalized form of
* the variable name: the section and variable parts are lower-cased. The
* subsection is left unchanged.
*
* @returns An iterator over the `ConfigEntry` values of a config.
*/
multivar(name: string, regexp?: string | undefined | null): ConfigEntries
/**
* Set the value of a boolean config variable in the config file with the
* highest level (usually the local one).
*
* @category Config/Methods
* @signature
* ```ts
* class Config {
* setBool(name: string, value: boolean): void;
* }
* ```
*
* @param {string} name - The name of config entry.
* @param {boolean} value - The value of config entry.
*/
setBool(name: string, value: boolean): void
/**
* Set the value of an integer config variable in the config file with the
* highest level (usually the local one).
*
* @category Config/Methods
* @signature
* ```ts
* class Config {
* setI32(name: string, value: number): void;
* }