Skip to content

Commit 8cd3c83

Browse files
committed
Create interface for retrieving git version information
1 parent 7899462 commit 8cd3c83

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

simple-git/src/lib/tasks/config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { ConfigGetResult, ConfigListSummary, SimpleGit } from '../../../typings';
1+
import type { ConfigGetResult, ConfigListSummary, SimpleGit } from '../../../typings';
22
import { configGetParser, configListParser } from '../responses/ConfigList';
3-
import { SimpleGitApi } from '../simple-git-api';
4-
import { StringTask } from '../types';
3+
import type { SimpleGitApi } from '../simple-git-api';
4+
import type { StringTask } from '../types';
55
import { trailingFunctionArgument } from '../utils';
66

77
export enum GitConfigScope {

simple-git/typings/simple-git.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ export interface SimpleGit extends SimpleGitBase {
170170
key: string,
171171
value: string,
172172
append?: boolean,
173-
scope?: keyof types.GitConfigScope,
173+
scope?: keyof typeof types.GitConfigScope,
174174
callback?: types.SimpleGitTaskCallback<string>
175175
): Response<string>;
176176

@@ -205,7 +205,7 @@ export interface SimpleGit extends SimpleGitBase {
205205
* Configuration values visible to git in the current working directory
206206
*/
207207
listConfig(
208-
scope: keyof types.GitConfigScope,
208+
scope: keyof typeof types.GitConfigScope,
209209
callback?: types.SimpleGitTaskCallback<resp.ConfigListSummary>
210210
): Response<resp.ConfigListSummary>;
211211

@@ -557,7 +557,7 @@ export interface SimpleGit extends SimpleGitBase {
557557
*/
558558
getConfig(
559559
key: string,
560-
scope?: keyof types.GitConfigScope,
560+
scope?: keyof typeof types.GitConfigScope,
561561
callback?: types.SimpleGitTaskCallback<string>
562562
): Response<resp.ConfigGetResult>;
563563

simple-git/typings/types.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export type { ApplyOptions } from '../src/lib/tasks/apply-patch';
1414
export type { CheckRepoActions } from '../src/lib/tasks/check-is-repo';
1515
export type { CleanOptions, CleanMode } from '../src/lib/tasks/clean';
1616
export type { CloneOptions } from '../src/lib/tasks/clone';
17-
export type { GitConfigScope } from '../src/lib/tasks/config';
17+
export { GitConfigScope } from '../src/lib/tasks/config';
1818
export type { GitGrepQuery, grepQueryBuilder } from '../src/lib/tasks/grep';
1919
export type { ResetOptions, ResetMode } from '../src/lib/tasks/reset';
2020
export type { VersionResult } from '../src/lib/tasks/version';

0 commit comments

Comments
 (0)