Skip to content

Commit

Permalink
Create interface for retrieving git version information
Browse files Browse the repository at this point in the history
  • Loading branch information
steveukx committed Sep 3, 2022
1 parent 7899462 commit 8cd3c83
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions simple-git/src/lib/tasks/config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ConfigGetResult, ConfigListSummary, SimpleGit } from '../../../typings';
import type { ConfigGetResult, ConfigListSummary, SimpleGit } from '../../../typings';
import { configGetParser, configListParser } from '../responses/ConfigList';
import { SimpleGitApi } from '../simple-git-api';
import { StringTask } from '../types';
import type { SimpleGitApi } from '../simple-git-api';
import type { StringTask } from '../types';
import { trailingFunctionArgument } from '../utils';

export enum GitConfigScope {
Expand Down
6 changes: 3 additions & 3 deletions simple-git/typings/simple-git.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export interface SimpleGit extends SimpleGitBase {
key: string,
value: string,
append?: boolean,
scope?: keyof types.GitConfigScope,
scope?: keyof typeof types.GitConfigScope,
callback?: types.SimpleGitTaskCallback<string>
): Response<string>;

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

Expand Down Expand Up @@ -557,7 +557,7 @@ export interface SimpleGit extends SimpleGitBase {
*/
getConfig(
key: string,
scope?: keyof types.GitConfigScope,
scope?: keyof typeof types.GitConfigScope,
callback?: types.SimpleGitTaskCallback<string>
): Response<resp.ConfigGetResult>;

Expand Down
2 changes: 1 addition & 1 deletion simple-git/typings/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export type { ApplyOptions } from '../src/lib/tasks/apply-patch';
export type { CheckRepoActions } from '../src/lib/tasks/check-is-repo';
export type { CleanOptions, CleanMode } from '../src/lib/tasks/clean';
export type { CloneOptions } from '../src/lib/tasks/clone';
export type { GitConfigScope } from '../src/lib/tasks/config';
export { GitConfigScope } from '../src/lib/tasks/config';
export type { GitGrepQuery, grepQueryBuilder } from '../src/lib/tasks/grep';
export type { ResetOptions, ResetMode } from '../src/lib/tasks/reset';
export type { VersionResult } from '../src/lib/tasks/version';

0 comments on commit 8cd3c83

Please sign in to comment.