Skip to content

Commit

Permalink
Merge branch 'stephenlautier-feature/adding-more-typings'
Browse files Browse the repository at this point in the history
  • Loading branch information
steveukx committed Apr 4, 2017
2 parents 9c3aead + 9ca2f90 commit c803d51
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions typings/promise/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,32 @@ declare namespace simplegit {

interface SimpleGit {

/**
* Check out a tag or revision, any number of additional arguments can be passed to the `git checkout` command
* by supplying either a string or array of strings as the `what` parameter.
*
* @param {(string | string[])} what one or more commands to pass to `git checkout`.
* @returns {Promise<void>}
*/
checkout(what: string | string[]): Promise<void>;

/**
* Checkout a remote branch.
*
* @param {string} branchName name of branch.
* @param {string} startPoint (e.g origin/development).
* @returns {Promise<void>}
*/
checkoutBranch(branchName: string, startPoint: string): Promise<void>;

/**
* Checkout a local branch
*
* @param {string} branchName name of branch.
* @returns {Promise<void>}
*/
checkoutLocalBranch(branchName: string): Promise<void>;

/**
* Clone a repository into a new directory.
*
Expand Down Expand Up @@ -44,6 +70,25 @@ declare namespace simplegit {
*/
fetch(remote?: string, branch?: string, options?: string[]): Promise<FetchResult>;

/**
* Merges from one branch to another, equivalent to running `git merge ${from} $[to}`, the `options` argument can
* either be an array of additional parameters to pass to the command or null / omitted to be ignored.
*
* @param {string} from branch to merge from.
* @param {string} to branch to merge to.
* @param {string[]} [options] options supported by [git](https://git-scm.com/docs/git-merge).
* @returns {Promise<string>}
*/
mergeFromTo(from: string, to: string, options?: string[]): Promise<string>;

/**
* Join two or more development histories together.
*
* @param {string[]} [options] options supported by [git](https://git-scm.com/docs/git-merge).
* @returns {Promise<string>}
*/
merge(options: string[]): Promise<string>;

/**
* Fetch from and integrate with another repository or a local branch.
*
Expand Down

0 comments on commit c803d51

Please sign in to comment.