@types/nodegit
Version:
TypeScript definitions for nodegit
54 lines (50 loc) • 1.75 kB
TypeScript
import { CheckoutOptions } from './checkout-options';
import { AnnotatedCommit } from './annotated-commit';
import { Repository } from './repository';
import { Signature } from './signature';
import { Oid } from './oid';
import { RebaseOperation } from './rebase-operation';
import { Index, MergeOptions, Tree } from './index';
export interface RebaseOptions<PayloadType = any> {
version?: number | null;
quiet?: number | null;
inmemory?: number | null;
rewriteNotesRef?: string | null;
mergeOptions?: MergeOptions | null;
checkoutOptions?: CheckoutOptions | null;
commitCreateCb?: ((
author: Signature,
committer: Signature,
message_encoding: string,
message: string,
tree: Tree,
parent_count: number,
parents: Oid[],
payload?: PayloadType
) => Oid) | null;
payload?: PayloadType | null;
}
export class Rebase {
static init(
repo: Repository,
branch: AnnotatedCommit | undefined | null,
upstream?: AnnotatedCommit | null,
onto?: AnnotatedCommit | null,
opts?: RebaseOptions | null,
): Promise<Rebase>;
static initOptions(opts: RebaseOptions, version: number): number;
static open(repo: Repository, opts?: RebaseOptions): Promise<Rebase>;
abort(): number;
commit(
author: Signature | undefined | null,
committer: Signature,
messageEncoding?: string | null,
message?: string | null,
): Promise<Oid>;
finish(signature?: Signature | null): number;
inmemoryIndex(index: Index): number;
next(): Promise<RebaseOperation>;
operationByIndex(idx: number): RebaseOperation;
operationCurrent(): number;
operationEntrycount(): number;
}