From 9dd615be310d3037e3b81bf8757147909fd0e143 Mon Sep 17 00:00:00 2001 From: Dolan Date: Thu, 8 Jun 2017 02:41:41 +0100 Subject: [PATCH] Documented Cherrypick --- types/nodegit/cherry-pick-options.d.ts | 24 ++++++++++++++++++ types/nodegit/cherry-pick.d.ts | 34 ++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) diff --git a/types/nodegit/cherry-pick-options.d.ts b/types/nodegit/cherry-pick-options.d.ts index 7c6ec6976c..8743217b47 100644 --- a/types/nodegit/cherry-pick-options.d.ts +++ b/types/nodegit/cherry-pick-options.d.ts @@ -2,8 +2,32 @@ import { MergeOptions } from './merge-options'; import { CheckoutOptions } from './checkout-options'; export interface CherrypickOptions { + /** + * + * + * @type {number} + * @memberof CherrypickOptions + */ version: number; + /** + * + * + * @type {number} + * @memberof CherrypickOptions + */ mainline: number; + /** + * + * + * @type {MergeOptions} + * @memberof CherrypickOptions + */ mergeOpts: MergeOptions; + /** + * + * + * @type {CheckoutOptions} + * @memberof CherrypickOptions + */ checkoutOpts: CheckoutOptions; } diff --git a/types/nodegit/cherry-pick.d.ts b/types/nodegit/cherry-pick.d.ts index 291c5e0223..b895845301 100644 --- a/types/nodegit/cherry-pick.d.ts +++ b/types/nodegit/cherry-pick.d.ts @@ -4,7 +4,41 @@ import { MergeOptions } from './merge-options'; import { CherrypickOptions } from './cherry-pick-options'; export class Cherrypick { + /** + * Cherrypick a commit and, changing the index and working directory + * + * @static + * @param {Repository} repo + * @param {Commit} commit + * @param {CherrypickOptions} [options] + * @returns {Promise} + * + * @memberof Cherrypick + */ static cherrypick(repo: Repository, commit: Commit, options?: CherrypickOptions): Promise; + /** + * Cherrypicks the given commit against "our" commit, producing an index that reflects the result of the cherrypick. The index is not backed by a repo. + * + * @static + * @param {Repository} repo + * @param {Commit} cherrypickCommit + * @param {Commit} ourCommit + * @param {number} mainline + * @param {MergeOptions} [mergeOptions] + * @returns {Promise} + * + * @memberof Cherrypick + */ static commit(repo: Repository, cherrypickCommit: Commit, ourCommit: Commit, mainline: number, mergeOptions?: MergeOptions): Promise; + /** + * + * + * @static + * @param {CherrypickOptions} opts + * @param {number} version + * @returns {number} + * + * @memberof Cherrypick + */ static initOptions(opts: CherrypickOptions, version: number): number; }