mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-22 12:33:38 +08:00
Stash typings
This commit is contained in:
1
types/nodegit/index.d.ts
vendored
1
types/nodegit/index.d.ts
vendored
@@ -34,6 +34,7 @@ export { RemoteCallbacks } from './remote-callbacks';
|
||||
export { Remote } from './remote';
|
||||
export { Repository } from './repository';
|
||||
export { Signature } from './signature';
|
||||
export { Stash } from './stash';
|
||||
export { StatusEntry } from './status-entry';
|
||||
export { StatusList } from './status-list';
|
||||
export { StatusOptions } from './status-options';
|
||||
|
||||
46
types/nodegit/stash.d.ts
vendored
Normal file
46
types/nodegit/stash.d.ts
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
import { Repository } from './repository';
|
||||
import { Signature } from './signature';
|
||||
import { Oid } from './oid';
|
||||
import { CheckoutOptions } from './checkout-options';
|
||||
|
||||
export namespace Stash {
|
||||
enum APPLY_FLAGS {
|
||||
APPLY_DEFAULT = 0,
|
||||
APPLY_REINSTATE_INDEX = 1
|
||||
}
|
||||
|
||||
enum APPLY_PROGRESS {
|
||||
NONE = 0,
|
||||
LOADING_STASH = 1,
|
||||
ANALYZE_INDEX = 2,
|
||||
ANALYZE_MODIFIED = 3,
|
||||
ANALYZE_UNTRACKED = 4,
|
||||
CHECKOUT_UNTRACKED = 5,
|
||||
CHECKOUT_MODIFIED = 6,
|
||||
DONE = 7
|
||||
}
|
||||
|
||||
enum FLAGS {
|
||||
DEFAULT = 0,
|
||||
KEEP_INDEX = 1,
|
||||
INCLUDE_UNTRACKED = 2,
|
||||
INCLUDE_IGNORED = 4
|
||||
}
|
||||
}
|
||||
|
||||
export interface StashApplyOptions {
|
||||
version: number;
|
||||
flags: number;
|
||||
checkoutOptions: CheckoutOptions;
|
||||
progressCb: Function;
|
||||
progressPayload: void;
|
||||
}
|
||||
|
||||
export class Stash {
|
||||
static apply(repo: Repository, index: number, options: StashApplyOptions): Promise<number>;
|
||||
static applyInitOptions(opts: StashApplyOptions, version: number): number;
|
||||
static drop(repo: Repository, index: number): Promise<number>;
|
||||
static foreach(repo: Repository, callback: Function, payload: void): Promise<number>;
|
||||
static pop(repo: Repository, index: number, options: StashApplyOptions): Promise<number>;
|
||||
static save(repo: Repository, stasher: Signature, message: string, flags: number): Promise<Oid>;
|
||||
}
|
||||
@@ -48,6 +48,7 @@
|
||||
"remote.d.ts",
|
||||
"repository.d.ts",
|
||||
"signature.d.ts",
|
||||
"stash.d.ts",
|
||||
"status-entry.d.ts",
|
||||
"status-list.d.ts",
|
||||
"status-options.d.ts",
|
||||
|
||||
Reference in New Issue
Block a user