-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.d.ts
56 lines (51 loc) · 1.46 KB
/
index.d.ts
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
import { SemVer } from "semver";
export type GitInfo = {
dirty: boolean;
raw: string;
hash: string;
distance: null | number;
tag: null | string;
semver: null | SemVer;
suffix: string;
semverString: null | string;
toString: () => string;
};
export type GitDescribeOptions = {
dirtyMark?: string;
dirtySemver?: boolean;
long?: boolean;
longSemver?: boolean;
requireAnnotated?: boolean;
match?: null | false | string;
customArguments?: Array<string>;
};
export type Callback = (err: Error, gitInfo: GitInfo) => void;
export declare function gitDescribe(directory: string): Promise<GitInfo>;
export declare function gitDescribe(
options: GitDescribeOptions
): Promise<GitInfo>;
export declare function gitDescribe(
directory: string,
options: GitDescribeOptions
): Promise<GitInfo>;
export declare function gitDescribe(callback: Callback): void;
export declare function gitDescribe(
options: GitDescribeOptions,
callback: Callback
): void;
export declare function gitDescribe(
directory: string,
callback: Callback
): void;
export declare function gitDescribe(
directory: string,
options: GitDescribeOptions,
callback: Callback
): void;
export declare function gitDescribeSync(): GitInfo;
export declare function gitDescribeSync(directory: string): GitInfo;
export declare function gitDescribeSync(options: GitDescribeOptions): GitInfo;
export declare function gitDescribeSync(
directory: string,
options: GitDescribeOptions
): GitInfo;