Improve typings.

This commit is contained in:
JimiC
2017-11-05 19:46:31 +02:00
parent 718ba93da6
commit c5e7c44434
35 changed files with 162 additions and 82 deletions

View File

@@ -5,10 +5,11 @@ import { Commit } from './commit';
import { Index } from './index';
export interface RevertOptions {
version: number;
mainline: number;
mergeOpts: MergeOptions;
checkoutOpts: CheckoutOptions;
version?: number;
mainline?: number;
mergeOpts?: MergeOptions;
checkoutOpts?: CheckoutOptions;
[key: string]: any;
}
export class Revert {
@@ -16,5 +17,5 @@ export class Revert {
/**
* Reverts the given commit against the given "our" commit, producing an index that reflects the result of the revert.
*/
static commit(repo: Repository, revertCommit: Commit, ourCommit: Commit, mainline: number, mergeOptions: MergeOptions): Promise<Index>;
static commit(repo: Repository, revertCommit: Commit, ourCommit: Commit, mainline: number, mergeOptions?: MergeOptions): Promise<Index>;
}