mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Added documentation
This commit is contained in:
parent
21c17befd3
commit
851aeea04a
37
types/nodegit/reset.d.ts
vendored
37
types/nodegit/reset.d.ts
vendored
@ -13,7 +13,44 @@ export namespace Reset {
|
||||
}
|
||||
|
||||
export class Reset {
|
||||
/**
|
||||
* Look up a refs's commit.
|
||||
*
|
||||
* @static
|
||||
* @param {Repository} repo
|
||||
* @param {Object} target
|
||||
* @param {number} reset_type
|
||||
* @param {CheckoutOptions} checkout_opts
|
||||
* @returns {Promise<number>}
|
||||
*
|
||||
* @memberof Reset
|
||||
*/
|
||||
static reset(repo: Repository, target: Object, reset_type: number, checkout_opts: CheckoutOptions): Promise<number>;
|
||||
/**
|
||||
* Look up a refs's commit.
|
||||
*
|
||||
* @static
|
||||
* @param {Repository} repo
|
||||
* @param {Object} target
|
||||
* @param {Strarray} pathspecs
|
||||
* @returns {Promise<number>}
|
||||
*
|
||||
* @memberof Reset
|
||||
*/
|
||||
static default(repo: Repository, target: Object, pathspecs: Strarray): Promise<number>;
|
||||
/**
|
||||
* Sets the current head to the specified commit oid and optionally resets the index and working tree to match.
|
||||
* This behaves like reset but takes an annotated commit, which lets you specify which extended sha syntax string was specified by a user, allowing for more exact reflog messages.
|
||||
* See the documentation for reset.
|
||||
*
|
||||
* @static
|
||||
* @param {Repository} repo
|
||||
* @param {AnnotatedCommit} commit
|
||||
* @param {number} reset_type
|
||||
* @param {CheckoutOptions} checkout_opts
|
||||
* @returns {number}
|
||||
*
|
||||
* @memberof Reset
|
||||
*/
|
||||
static fromAnnotated(repo: Repository, commit: AnnotatedCommit, reset_type: number, checkout_opts: CheckoutOptions): number;
|
||||
}
|
||||
|
||||
22
types/nodegit/rev-parse.d.ts
vendored
22
types/nodegit/rev-parse.d.ts
vendored
@ -11,6 +11,28 @@ export namespace Revparse {
|
||||
}
|
||||
|
||||
export class Revparse {
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @static
|
||||
* @param {Object} object_out
|
||||
* @param {Reference} reference_out
|
||||
* @param {Repository} repo
|
||||
* @param {string} spec
|
||||
* @returns {number}
|
||||
*
|
||||
* @memberof Revparse
|
||||
*/
|
||||
static ext(object_out: Object, reference_out: Reference, repo: Repository, spec: string): number;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @static
|
||||
* @param {Repository} repo
|
||||
* @param {string} spec
|
||||
* @returns {Promise<Object>}
|
||||
*
|
||||
* @memberof Revparse
|
||||
*/
|
||||
static single(repo: Repository, spec: string): Promise<Object>;
|
||||
}
|
||||
|
||||
157
types/nodegit/rev-walk.d.ts
vendored
157
types/nodegit/rev-walk.d.ts
vendored
@ -12,25 +12,180 @@ export namespace Revwalk {
|
||||
}
|
||||
|
||||
export class Revwalk {
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @static
|
||||
* @param {Repository} repo
|
||||
* @returns {Revwalk}
|
||||
*
|
||||
* @memberof Revwalk
|
||||
*/
|
||||
static create(repo: Repository): Revwalk;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param {Oid} commit_id
|
||||
* @returns {number}
|
||||
*
|
||||
* @memberof Revwalk
|
||||
*/
|
||||
hide(commit_id: Oid): number;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param {string} glob
|
||||
* @returns {number}
|
||||
*
|
||||
* @memberof Revwalk
|
||||
*/
|
||||
hideGlob(glob: string): number;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @returns {number}
|
||||
*
|
||||
* @memberof Revwalk
|
||||
*/
|
||||
hideHead(): number;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param {string} refname
|
||||
* @returns {number}
|
||||
*
|
||||
* @memberof Revwalk
|
||||
*/
|
||||
hideRef(refname: string): number;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @returns {Promise<Oid>}
|
||||
*
|
||||
* @memberof Revwalk
|
||||
*/
|
||||
next(): Promise<Oid>;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param {Oid} id
|
||||
* @returns {number}
|
||||
*
|
||||
* @memberof Revwalk
|
||||
*/
|
||||
push(id: Oid): number;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param {string} glob
|
||||
* @returns {number}
|
||||
*
|
||||
* @memberof Revwalk
|
||||
*/
|
||||
pushGlob(glob: string): number;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @returns {number}
|
||||
*
|
||||
* @memberof Revwalk
|
||||
*/
|
||||
pushHead(): number;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param {string} range
|
||||
* @returns {number}
|
||||
*
|
||||
* @memberof Revwalk
|
||||
*/
|
||||
pushRange(range: string): number;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param {string} refname
|
||||
* @returns {number}
|
||||
*
|
||||
* @memberof Revwalk
|
||||
*/
|
||||
pushRef(refname: string): number;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @returns {Repository}
|
||||
*
|
||||
* @memberof Revwalk
|
||||
*/
|
||||
repository(): Repository;
|
||||
/**
|
||||
*
|
||||
*
|
||||
*
|
||||
* @memberof Revwalk
|
||||
*/
|
||||
reset(): void;
|
||||
/**
|
||||
*
|
||||
*
|
||||
*
|
||||
* @memberof Revwalk
|
||||
*/
|
||||
simplifyFirstParent(): void;
|
||||
sorting(sort: number): any;
|
||||
/**
|
||||
* Set the sort order for the revwalk. This function takes variable arguments like revwalk.sorting(NodeGit.RevWalk.Topological, NodeGit.RevWalk.Reverse).
|
||||
*
|
||||
* @param {number} sort
|
||||
*
|
||||
* @memberof Revwalk
|
||||
*/
|
||||
sorting(sort: number): void;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param {number} max_count
|
||||
* @returns {Promise<any>}
|
||||
*
|
||||
* @memberof Revwalk
|
||||
*/
|
||||
fastWalk(max_count: number): Promise<any>;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param {string} filePath
|
||||
* @param {number} max_count
|
||||
* @returns {Promise<any[]>}
|
||||
*
|
||||
* @memberof Revwalk
|
||||
*/
|
||||
fileHistoryWalk(filePath: string, max_count: number): Promise<any[]>;
|
||||
/**
|
||||
* Walk the history from the given oid. The callback is invoked for each commit; When the walk is over, the callback is invoked with (null, null).
|
||||
*
|
||||
* @param {Oid} oid
|
||||
* @param {Function} callback
|
||||
* @returns {Commit}
|
||||
*
|
||||
* @memberof Revwalk
|
||||
*/
|
||||
walk(oid: Oid, callback: Function): Commit;
|
||||
/**
|
||||
* Walk the history grabbing commits until the checkFn called with the current commit returns false.
|
||||
*
|
||||
* @param {Function} checkFn
|
||||
* @returns {Promise<any[]>}
|
||||
*
|
||||
* @memberof Revwalk
|
||||
*/
|
||||
getCommitsUntil(checkFn: Function): Promise<any[]>;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param {number} count
|
||||
* @returns {Promise<Commit[]>}
|
||||
*
|
||||
* @memberof Revwalk
|
||||
*/
|
||||
getCommits(count: number): Promise<Commit[]>;
|
||||
|
||||
}
|
||||
|
||||
28
types/nodegit/revert.d.ts
vendored
28
types/nodegit/revert.d.ts
vendored
@ -12,6 +12,30 @@ export interface RevertOptions {
|
||||
}
|
||||
|
||||
export class Revert {
|
||||
static revert(repo: Repository, commit: Commit, given_opts: RevertOptions): Promise<number>;
|
||||
static commit(repo: Repository, revert_commit: Commit, our_commit: Commit, mainline: number, merge_options: MergeOptions): Promise<Index>;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @static
|
||||
* @param {Repository} repo
|
||||
* @param {Commit} commit
|
||||
* @param {RevertOptions} givenOpts
|
||||
* @returns {Promise<number>}
|
||||
*
|
||||
* @memberof Revert
|
||||
*/
|
||||
static revert(repo: Repository, commit: Commit, givenOpts: RevertOptions): Promise<number>;
|
||||
/**
|
||||
* Reverts the given commit against the given "our" commit, producing an index that reflects the result of the revert.
|
||||
*
|
||||
* @static
|
||||
* @param {Repository} repo
|
||||
* @param {Commit} revert_commit
|
||||
* @param {Commit} ourCommit
|
||||
* @param {number} mainline
|
||||
* @param {MergeOptions} mergeOptions
|
||||
* @returns {Promise<Index>}
|
||||
*
|
||||
* @memberof Revert
|
||||
*/
|
||||
static commit(repo: Repository, revert_commit: Commit, ourCommit: Commit, mainline: number, mergeOptions: MergeOptions): Promise<Index>;
|
||||
}
|
||||
|
||||
79
types/nodegit/signature.d.ts
vendored
79
types/nodegit/signature.d.ts
vendored
@ -2,14 +2,93 @@ import { Repository } from './repository';
|
||||
import { Time } from './time';
|
||||
|
||||
export class Signature {
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @static
|
||||
* @param {Repository} repo
|
||||
* @returns {Signature}
|
||||
*
|
||||
* @memberof Signature
|
||||
*/
|
||||
static default(repo: Repository): Signature;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @static
|
||||
* @param {string} name
|
||||
* @param {string} email
|
||||
* @param {number} time
|
||||
* @param {number} offset
|
||||
* @returns {Signature}
|
||||
*
|
||||
* @memberof Signature
|
||||
*/
|
||||
static create(name: string, email: string, time: number, offset: number): Signature;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @static
|
||||
* @param {string} name
|
||||
* @param {string} email
|
||||
* @returns {Signature}
|
||||
*
|
||||
* @memberof Signature
|
||||
*/
|
||||
static now(name: string, email: string): Signature;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @static
|
||||
* @param {string} buf
|
||||
* @returns {Promise<Signature>}
|
||||
*
|
||||
* @memberof Signature
|
||||
*/
|
||||
static fromBuffer(buf: string): Promise<Signature>;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @returns {Promise<Signature>}
|
||||
*
|
||||
* @memberof Signature
|
||||
*/
|
||||
dup(): Promise<Signature>;
|
||||
/**
|
||||
*
|
||||
*
|
||||
*
|
||||
* @memberof Signature
|
||||
*/
|
||||
free(): void;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @returns {string}
|
||||
*
|
||||
* @memberof Signature
|
||||
*/
|
||||
toString(): string;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Signature
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Signature
|
||||
*/
|
||||
email: string;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @type {Time}
|
||||
* @memberof Signature
|
||||
*/
|
||||
when: Time;
|
||||
}
|
||||
|
||||
105
types/nodegit/stash.d.ts
vendored
105
types/nodegit/stash.d.ts
vendored
@ -29,18 +29,113 @@ export namespace Stash {
|
||||
}
|
||||
|
||||
export interface StashApplyOptions {
|
||||
version: number;
|
||||
flags: number;
|
||||
checkoutOptions: CheckoutOptions;
|
||||
progressCb: Function;
|
||||
progressPayload: any;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof StashApplyOptions
|
||||
*/
|
||||
version?: number;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof StashApplyOptions
|
||||
*/
|
||||
flags?: number;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @type {CheckoutOptions}
|
||||
* @memberof StashApplyOptions
|
||||
*/
|
||||
checkoutOptions?: CheckoutOptions;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @type {Function}
|
||||
* @memberof StashApplyOptions
|
||||
*/
|
||||
progressCb?: Function;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @type {*}
|
||||
* @memberof StashApplyOptions
|
||||
*/
|
||||
progressPayload?: any;
|
||||
}
|
||||
|
||||
export class Stash {
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @static
|
||||
* @param {Repository} repo
|
||||
* @param {number} index
|
||||
* @param {StashApplyOptions} options
|
||||
* @returns {Promise<number>}
|
||||
*
|
||||
* @memberof Stash
|
||||
*/
|
||||
static apply(repo: Repository, index: number, options: StashApplyOptions): Promise<number>;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @static
|
||||
* @param {StashApplyOptions} opts
|
||||
* @param {number} version
|
||||
* @returns {number}
|
||||
*
|
||||
* @memberof Stash
|
||||
*/
|
||||
static applyInitOptions(opts: StashApplyOptions, version: number): number;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @static
|
||||
* @param {Repository} repo
|
||||
* @param {number} index
|
||||
* @returns {Promise<number>}
|
||||
*
|
||||
* @memberof Stash
|
||||
*/
|
||||
static drop(repo: Repository, index: number): Promise<number>;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @static
|
||||
* @param {Repository} repo
|
||||
* @param {Function} callback
|
||||
* @param {*} payload
|
||||
* @returns {Promise<number>}
|
||||
*
|
||||
* @memberof Stash
|
||||
*/
|
||||
static foreach(repo: Repository, callback: Function, payload: any): Promise<number>;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @static
|
||||
* @param {Repository} repo
|
||||
* @param {number} index
|
||||
* @param {StashApplyOptions} options
|
||||
* @returns {Promise<number>}
|
||||
*
|
||||
* @memberof Stash
|
||||
*/
|
||||
static pop(repo: Repository, index: number, options: StashApplyOptions): Promise<number>;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @static
|
||||
* @param {Repository} repo
|
||||
* @param {Signature} stasher
|
||||
* @param {string} message
|
||||
* @param {number} flags
|
||||
* @returns {Promise<Oid>}
|
||||
*
|
||||
* @memberof Stash
|
||||
*/
|
||||
static save(repo: Repository, stasher: Signature, message: string, flags: number): Promise<Oid>;
|
||||
}
|
||||
|
||||
18
types/nodegit/status-entry.d.ts
vendored
18
types/nodegit/status-entry.d.ts
vendored
@ -1,7 +1,25 @@
|
||||
import { DiffDelta } from './diff-delta';
|
||||
|
||||
export class StatusEntry {
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof StatusEntry
|
||||
*/
|
||||
status: number;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @type {DiffDelta}
|
||||
* @memberof StatusEntry
|
||||
*/
|
||||
headToIndex: DiffDelta;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @type {DiffDelta}
|
||||
* @memberof StatusEntry
|
||||
*/
|
||||
indexToWorkdir: DiffDelta;
|
||||
}
|
||||
|
||||
30
types/nodegit/status-list.d.ts
vendored
30
types/nodegit/status-list.d.ts
vendored
@ -3,9 +3,39 @@ import { DiffPerfdata } from './diff-perf-data';
|
||||
import { StatusOptions } from './status-options';
|
||||
|
||||
export class StatusList {
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @static
|
||||
* @param {Repository} repo
|
||||
* @param {StatusOptions} opts
|
||||
* @returns {Promise<StatusList>}
|
||||
*
|
||||
* @memberof StatusList
|
||||
*/
|
||||
static create(repo: Repository, opts: StatusOptions): Promise<StatusList>;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @returns {number}
|
||||
*
|
||||
* @memberof StatusList
|
||||
*/
|
||||
entrycount(): number;
|
||||
/**
|
||||
*
|
||||
*
|
||||
*
|
||||
* @memberof StatusList
|
||||
*/
|
||||
free(): void;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @returns {Promise<DiffPerfdata>}
|
||||
*
|
||||
* @memberof StatusList
|
||||
*/
|
||||
getPerfdata(): Promise<DiffPerfdata>;
|
||||
}
|
||||
|
||||
24
types/nodegit/status-options.d.ts
vendored
24
types/nodegit/status-options.d.ts
vendored
@ -1,8 +1,32 @@
|
||||
import { Strarray } from './str-array';
|
||||
|
||||
export interface StatusOptions {
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof StatusOptions
|
||||
*/
|
||||
version?: number;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof StatusOptions
|
||||
*/
|
||||
show?: number;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof StatusOptions
|
||||
*/
|
||||
flags?: number;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @type {Strarray}
|
||||
* @memberof StatusOptions
|
||||
*/
|
||||
pathspec?: Strarray;
|
||||
}
|
||||
|
||||
54
types/nodegit/status.d.ts
vendored
54
types/nodegit/status.d.ts
vendored
@ -48,9 +48,63 @@ export namespace Status {
|
||||
}
|
||||
|
||||
export class Status {
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @static
|
||||
* @param {StatusList} statuslist
|
||||
* @param {number} idx
|
||||
* @returns {StatusEntry}
|
||||
*
|
||||
* @memberof Status
|
||||
*/
|
||||
static byIndex(statuslist: StatusList, idx: number): StatusEntry;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @static
|
||||
* @param {Repository} repo
|
||||
* @param {string} path
|
||||
* @returns {number}
|
||||
*
|
||||
* @memberof Status
|
||||
*/
|
||||
static file(repo: Repository, path: string): number;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @static
|
||||
* @param {Repository} repo
|
||||
* @param {Function} callback
|
||||
* @param {*} payload
|
||||
* @returns {Promise<number>}
|
||||
*
|
||||
* @memberof Status
|
||||
*/
|
||||
static foreach(repo: Repository, callback: Function, payload: any): Promise<number>;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @static
|
||||
* @param {Repository} repo
|
||||
* @param {StatusOptions} opts
|
||||
* @param {Function} callback
|
||||
* @param {*} payload
|
||||
* @returns {Promise<number>}
|
||||
*
|
||||
* @memberof Status
|
||||
*/
|
||||
static foreachExt(repo: Repository, opts: StatusOptions, callback: Function, payload: any): Promise<number>;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @static
|
||||
* @param {number} ignored
|
||||
* @param {Repository} repo
|
||||
* @param {string} path
|
||||
* @returns {number}
|
||||
*
|
||||
* @memberof Status
|
||||
*/
|
||||
static shouldIgnore(ignored: number, repo: Repository, path: string): number;
|
||||
}
|
||||
|
||||
26
types/nodegit/str-array.d.ts
vendored
26
types/nodegit/str-array.d.ts
vendored
@ -1,6 +1,32 @@
|
||||
export class Strarray {
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param {Strarray} src
|
||||
* @returns {number}
|
||||
*
|
||||
* @memberof Strarray
|
||||
*/
|
||||
copy(src: Strarray): number;
|
||||
/**
|
||||
*
|
||||
*
|
||||
*
|
||||
* @memberof Strarray
|
||||
*/
|
||||
free(): void;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @type {string[]}
|
||||
* @memberof Strarray
|
||||
*/
|
||||
strings: string[];
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Strarray
|
||||
*/
|
||||
count: number;
|
||||
}
|
||||
|
||||
24
types/nodegit/submodule-update-options.d.ts
vendored
24
types/nodegit/submodule-update-options.d.ts
vendored
@ -2,8 +2,32 @@ import { CheckoutOptions } from './checkout-options';
|
||||
import { FetchOptions } from './fetch-options';
|
||||
|
||||
export interface SubmoduleUpdateOptions {
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SubmoduleUpdateOptions
|
||||
*/
|
||||
version?: number;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @type {CheckoutOptions}
|
||||
* @memberof SubmoduleUpdateOptions
|
||||
*/
|
||||
checkoutOpts?: CheckoutOptions;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @type {FetchOptions}
|
||||
* @memberof SubmoduleUpdateOptions
|
||||
*/
|
||||
fetchOpts?: FetchOptions;
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SubmoduleUpdateOptions
|
||||
*/
|
||||
cloneCheckoutStrategy?: number;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user