UNPKG

1.03 kBTypeScriptView Raw
1import { GitError } from '../errors/git-error';
2/**
3 * The node-style callback to a task accepts either two arguments with the first as a null
4 * and the second as the data, or just one argument which is an error.
5 */
6export declare type SimpleGitTaskCallback<T = string, E extends GitError = GitError> = (err: E | null, data: T) => void;
7/**
8 * The event data emitted to the progress handler whenever progress detail is received.
9 */
10export interface SimpleGitProgressEvent {
11 /** The underlying method called - push, pull etc */
12 method: string;
13 /** The type of progress being reported, note that any one task may emit many stages - for example `git clone` emits both `receiving` and `resolving` */
14 stage: 'compressing' | 'counting' | 'receiving' | 'resolving' | 'unknown' | 'writing' | string;
15 /** The percent progressed as a number 0 - 100 */
16 progress: number;
17 /** The number of items processed so far */
18 processed: number;
19 /** The total number of items to be processed */
20 total: number;
21}