mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Improve typings.
This commit is contained in:
parent
718ba93da6
commit
c5e7c44434
1
types/nodegit/blame-options.d.ts
vendored
1
types/nodegit/blame-options.d.ts
vendored
@ -8,4 +8,5 @@ export class BlameOptions {
|
||||
oldestCommit?: Oid;
|
||||
minLine?: number;
|
||||
maxLine?: number;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
1
types/nodegit/checkout-options.d.ts
vendored
1
types/nodegit/checkout-options.d.ts
vendored
@ -23,4 +23,5 @@ export class CheckoutOptions {
|
||||
theirLabel?: string;
|
||||
perfdataCb?: any;
|
||||
perfdataPayload?: undefined;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
8
types/nodegit/commit.d.ts
vendored
8
types/nodegit/commit.d.ts
vendored
@ -85,25 +85,25 @@ export class Commit {
|
||||
*
|
||||
*
|
||||
*/
|
||||
getParents(limit: number, callback: Function): Promise<Commit[]>;
|
||||
getParents(limit: number, callback?: Function): Promise<Commit[]>;
|
||||
/**
|
||||
* Retrieve the commit's parent shas.
|
||||
*
|
||||
*
|
||||
*/
|
||||
parents(callback: Function): Oid[];
|
||||
parents(): Oid[];
|
||||
/**
|
||||
* Generate an array of diff trees showing changes between this commit and its parent(s).
|
||||
*
|
||||
*
|
||||
*/
|
||||
getDiff(callback: Function): Promise<Diff[]>;
|
||||
getDiff(callback?: Function): Promise<Diff[]>;
|
||||
/**
|
||||
* Generate an array of diff trees showing changes between this commit and its parent(s).
|
||||
*
|
||||
*
|
||||
*/
|
||||
getDiffWithOptions(options: Object, callback: Function): Promise<Diff[]>;
|
||||
getDiffWithOptions(options: Object, callback?: Function): Promise<Diff[]>;
|
||||
/**
|
||||
* The sha of this commit
|
||||
*
|
||||
|
||||
37
types/nodegit/convenient-hunk.d.ts
vendored
Normal file
37
types/nodegit/convenient-hunk.d.ts
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
import { DiffLine } from './diff-line';
|
||||
|
||||
export class ConvenientHunk {
|
||||
/**
|
||||
* Diff header string that represents the context of this hunk
|
||||
* of the diff. Something like `@@ -169,14 +167,12 @@ ...`
|
||||
*/
|
||||
header(): string;
|
||||
/**
|
||||
* The length of the header
|
||||
*/
|
||||
headerLen(): number;
|
||||
/**
|
||||
* The lines in this hunk
|
||||
*/
|
||||
lines(): Promise<DiffLine[]>;
|
||||
/**
|
||||
* The number of new lines in the hunk
|
||||
*/
|
||||
newLines(): number;
|
||||
/**
|
||||
* The starting offset of the first new line in the file
|
||||
*/
|
||||
newStart(): number;
|
||||
/**
|
||||
* The number of old lines in the hunk
|
||||
*/
|
||||
oldLines(): number;
|
||||
/**
|
||||
* The starting offset of the first old line in the file
|
||||
*/
|
||||
oldStart(): number;
|
||||
/**
|
||||
* Number of lines in this hunk
|
||||
*/
|
||||
size(): number;
|
||||
}
|
||||
3
types/nodegit/convenient-patch.d.ts
vendored
3
types/nodegit/convenient-patch.d.ts
vendored
@ -1,3 +1,4 @@
|
||||
import { ConvenientHunk } from './convenient-hunk';
|
||||
import { DiffFile } from './diff-file';
|
||||
|
||||
export class ConvenientPatch {
|
||||
@ -16,7 +17,7 @@ export class ConvenientPatch {
|
||||
/**
|
||||
* The hunks in this patch
|
||||
*/
|
||||
hunks(): Promise<any[]>;
|
||||
hunks(): Promise<ConvenientHunk[]>;
|
||||
/**
|
||||
* The status of this patch (unmodified, added, deleted)
|
||||
*/
|
||||
|
||||
1
types/nodegit/describe-format-options.d.ts
vendored
1
types/nodegit/describe-format-options.d.ts
vendored
@ -3,4 +3,5 @@ export class DescribeFormatOptions {
|
||||
abbreviatedSize?: number;
|
||||
alwaysUseLongFormat?: number;
|
||||
dirtySuffix?: string;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
1
types/nodegit/describe-options.d.ts
vendored
1
types/nodegit/describe-options.d.ts
vendored
@ -5,4 +5,5 @@ export class DescribeOptions {
|
||||
pattern?: string;
|
||||
onlyFollowFirstParent?: number;
|
||||
showCommitOidAsFallback?: number;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
8
types/nodegit/diff-hunk.d.ts
vendored
8
types/nodegit/diff-hunk.d.ts
vendored
@ -1,8 +0,0 @@
|
||||
export class DiffHunk {
|
||||
oldStart: number;
|
||||
oldLines: number;
|
||||
newStart: number;
|
||||
newLines: number;
|
||||
headerLen: number;
|
||||
header: string;
|
||||
}
|
||||
1
types/nodegit/diff-options.d.ts
vendored
1
types/nodegit/diff-options.d.ts
vendored
@ -14,4 +14,5 @@ export interface DiffOptions {
|
||||
newPrefix?: string;
|
||||
payload?: any;
|
||||
progressCb?: any;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
15
types/nodegit/diff.d.ts
vendored
15
types/nodegit/diff.d.ts
vendored
@ -7,6 +7,7 @@ import { DiffDelta } from './diff-delta';
|
||||
import { DiffPerfdata } from './diff-perf-data';
|
||||
import { DiffOptions } from './diff-options';
|
||||
import { Buf } from './buf';
|
||||
import { ConvenientPatch } from './convenient-patch';
|
||||
|
||||
export interface DiffFindOptions {
|
||||
version?: number;
|
||||
@ -134,12 +135,12 @@ export class Diff {
|
||||
static blobToBuffer(oldBlob: Blob, oldAsPath: string,
|
||||
buffer: string, bufferAsPath: string, opts: DiffOptions, fileCb: Function, binaryCb: Function, hunkCb: Function, lineCb: Function): Promise<any>;
|
||||
static fromBuffer(content: string, contentLen: number): Promise<Diff>;
|
||||
static indexToWorkdir(repo: Repository, index: Index, opts: DiffOptions): Promise<Diff>;
|
||||
static indexToIndex(repo: Repository, oldIndex: Index, newIndex: Index, opts: DiffOptions): Promise<Diff>;
|
||||
static treeToIndex(repo: Repository, oldTree: Tree, index: Index, opts: DiffOptions): Promise<Diff>;
|
||||
static treeToTree(repo: Repository, oldTree: Tree, new_tree: Tree, opts: DiffOptions): Promise<Diff>;
|
||||
static treeToWorkdir(repo: Repository, oldTree: Tree, opts: DiffOptions): Promise<Diff>;
|
||||
static treeToWorkdirWithIndex(repo: Repository, oldTree: Tree, opts: DiffOptions): Promise<Diff>;
|
||||
static indexToWorkdir(repo: Repository, index: Index, opts?: DiffOptions): Promise<Diff>;
|
||||
static indexToIndex(repo: Repository, oldIndex: Index, newIndex: Index, opts?: DiffOptions): Promise<Diff>;
|
||||
static treeToIndex(repo: Repository, oldTree: Tree, index: Index, opts?: DiffOptions): Promise<Diff>;
|
||||
static treeToTree(repo: Repository, oldTree: Tree, new_tree: Tree, opts?: DiffOptions): Promise<Diff>;
|
||||
static treeToWorkdir(repo: Repository, oldTree: Tree, opts?: DiffOptions): Promise<Diff>;
|
||||
static treeToWorkdirWithIndex(repo: Repository, oldTree: Tree, opts?: DiffOptions): Promise<Diff>;
|
||||
|
||||
findSimilar(options: DiffFindOptions): Promise<number>;
|
||||
getDelta(idx: number): DiffDelta;
|
||||
@ -150,7 +151,7 @@ export class Diff {
|
||||
*
|
||||
*
|
||||
*/
|
||||
patches(): Promise<any[]>;
|
||||
patches(): Promise<ConvenientPatch[]>;
|
||||
merge(from: Diff): Promise<number>;
|
||||
toBuf(format: Diff.FORMAT): Promise<Buf>;
|
||||
}
|
||||
|
||||
1
types/nodegit/fetch-options.d.ts
vendored
1
types/nodegit/fetch-options.d.ts
vendored
@ -9,4 +9,5 @@ export interface FetchOptions {
|
||||
downloadTags?: number;
|
||||
customHeaders?: Strarray;
|
||||
proxyOpts?: any;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
4
types/nodegit/index.d.ts
vendored
4
types/nodegit/index.d.ts
vendored
@ -22,6 +22,7 @@ export { CloneOptions } from './clone-options';
|
||||
export { Clone } from './clone';
|
||||
export { Commit } from './commit';
|
||||
export { Config } from './config';
|
||||
export { ConvenientHunk } from './convenient-hunk';
|
||||
export { ConvenientPatch } from './convenient-patch';
|
||||
export { CredUserpassPayload } from './cred-user-pass-payload';
|
||||
export { CredUsername } from './cred-username';
|
||||
@ -33,7 +34,6 @@ export { DiffBinaryFile } from './diff-binary-file';
|
||||
export { DiffBinary } from './diff-binary';
|
||||
export { DiffDelta } from './diff-delta';
|
||||
export { DiffFile } from './diff-file';
|
||||
export { DiffHunk } from './diff-hunk';
|
||||
export { DiffLine } from './diff-line';
|
||||
export { DiffOptions } from './diff-options';
|
||||
export { DiffPerfdata } from './diff-perf-data';
|
||||
@ -87,6 +87,8 @@ export { Revert } from './revert';
|
||||
export { Signature } from './signature';
|
||||
export { Stash } from './stash';
|
||||
export { StatusEntry } from './status-entry';
|
||||
export { StatusFileOptions } from './status-file-options';
|
||||
export { StatusFile } from './status-file';
|
||||
export { StatusList } from './status-list';
|
||||
export { StatusOptions } from './status-options';
|
||||
export { Status } from './status';
|
||||
|
||||
14
types/nodegit/index_.d.ts
vendored
14
types/nodegit/index_.d.ts
vendored
@ -21,13 +21,13 @@ export namespace Index {
|
||||
}
|
||||
|
||||
export class Index {
|
||||
static entryIsConflict(entry: IndexEntry): number;
|
||||
static entryIsConflict(entry: IndexEntry): boolean;
|
||||
static entryStage(entry: IndexEntry): number;
|
||||
static open(indexPath: string): Promise<Index>;
|
||||
|
||||
add(sourceEntry: IndexEntry): number;
|
||||
addAll(pathspec: Strarray, flags: number, callback: Function, payload: void): Promise<number>;
|
||||
addByPath(path: string): number;
|
||||
addAll(pathspec: Strarray, flags: number, callback?: Function): Promise<number>;
|
||||
addByPath(path: string): Promise<number>;
|
||||
caps(): number;
|
||||
checksum(): Oid;
|
||||
clear(): number;
|
||||
@ -38,17 +38,17 @@ export class Index {
|
||||
entryCount(): number;
|
||||
getByIndex(n: number): IndexEntry;
|
||||
getByPath(path: string, stage: number): IndexEntry;
|
||||
hasConflicts(): number;
|
||||
hasConflicts(): boolean;
|
||||
owner(): Repository;
|
||||
path(): string;
|
||||
read(force: number): number;
|
||||
readTree(tree: Tree): number;
|
||||
remove(path: string, stage: number): number;
|
||||
removeAll(pathspec: Strarray, callback: Function, payload: void): Promise<number>;
|
||||
removeByPath(path: string): number;
|
||||
removeAll(pathspec: Strarray, callback?: Function): Promise<number>;
|
||||
removeByPath(path: string): Promise<number>;
|
||||
removeDirectory(dir: string, stage: number): number;
|
||||
setCaps(caps: number): number;
|
||||
updateAll(pathspec: Strarray, callback: Function, payload: void): Promise<number>;
|
||||
updateAll(pathspec: Strarray, callback?: Function): Promise<number>;
|
||||
write(): number;
|
||||
writeTree(): Promise<Oid>;
|
||||
writeTreeTo(repo: Repository): Promise<Oid>;
|
||||
|
||||
1
types/nodegit/merge-file-options.d.ts
vendored
1
types/nodegit/merge-file-options.d.ts
vendored
@ -5,4 +5,5 @@ export interface MergeFileOptions {
|
||||
theirLabel?: string;
|
||||
favor?: number;
|
||||
flags?: number;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
1
types/nodegit/merge-options.d.ts
vendored
1
types/nodegit/merge-options.d.ts
vendored
@ -7,4 +7,5 @@ export class MergeOptions {
|
||||
defaultDriver?: string;
|
||||
flags?: number;
|
||||
recursionLimit?: number;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
2
types/nodegit/merge.d.ts
vendored
2
types/nodegit/merge.d.ts
vendored
@ -55,5 +55,5 @@ export class Merge {
|
||||
static commits(repo: Repository, ourCommit: Commit, theirCommit: Commit, options?: MergeOptions): any;
|
||||
static fileInitInput(opts: MergeFileInput, version: number): number;
|
||||
static initOptions(opts: MergeOptions, version: number): number;
|
||||
static trees(repo: Repository, ancestorTree: Tree, ourTree: Tree, theirTree: Tree, opts: MergeOptions): Promise<Index>;
|
||||
static trees(repo: Repository, ancestorTree: Tree, ourTree: Tree, theirTree: Tree, opts?: MergeOptions): Promise<Index>;
|
||||
}
|
||||
|
||||
1
types/nodegit/proxy-options.d.ts
vendored
1
types/nodegit/proxy-options.d.ts
vendored
@ -5,4 +5,5 @@ export class ProxyOptions {
|
||||
type?: number;
|
||||
url?: string;
|
||||
version?: number;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
1
types/nodegit/push-options.d.ts
vendored
1
types/nodegit/push-options.d.ts
vendored
@ -8,4 +8,5 @@ export interface PushOptions {
|
||||
callbacks?: RemoteCallbacks;
|
||||
customHeaders?: Strarray;
|
||||
proxyOpts?: ProxyOptions;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
4
types/nodegit/rebase.d.ts
vendored
4
types/nodegit/rebase.d.ts
vendored
@ -14,9 +14,9 @@ export interface RebaseOptions {
|
||||
}
|
||||
|
||||
export class Rebase {
|
||||
static init(repo: Repository, branch: AnnotatedCommit, upstream: AnnotatedCommit, onto: AnnotatedCommit, opts: RebaseOptions): Promise<Rebase>;
|
||||
static init(repo: Repository, branch: AnnotatedCommit, upstream: AnnotatedCommit, onto: AnnotatedCommit, opts?: RebaseOptions): Promise<Rebase>;
|
||||
static initOptions(opts: RebaseOptions, version: number): number;
|
||||
static open(repo: Repository, opts: RebaseOptions): Promise<Rebase>;
|
||||
static open(repo: Repository, opts?: RebaseOptions): Promise<Rebase>;
|
||||
|
||||
abort(): number;
|
||||
commit(author: Signature, committer: Signature, messageEncoding: string, message: string): Oid;
|
||||
|
||||
4
types/nodegit/reference.d.ts
vendored
4
types/nodegit/reference.d.ts
vendored
@ -21,12 +21,12 @@ export namespace Reference {
|
||||
export class Reference {
|
||||
static create(repo: Repository, name: string, id: Oid, force: number, logMessage: string): Promise<Reference>;
|
||||
static createMatching(repo: Repository, name: string, id: Oid, force: number, currentId: Oid, logMessage: string): Promise<Reference>;
|
||||
static dwim(repo: Repository, id: string | Reference, callback: Function): Promise<Reference>;
|
||||
static dwim(repo: Repository, id: string | Reference, callback?: Function): Promise<Reference>;
|
||||
static ensureLog(repo: Repository, refname: string): number;
|
||||
static hasLog(repo: Repository, refname: string): number;
|
||||
static isValidName(refname: string): number;
|
||||
static list(repo: Repository): Promise<any[]>;
|
||||
static lookup(repo: Repository, id: string | Reference, callback: Function): Promise<Reference>;
|
||||
static lookup(repo: Repository, id: string | Reference, callback?: Function): Promise<Reference>;
|
||||
static nameToId(repo: Repository, name: string): Promise<Oid>;
|
||||
static normalizeName(bufferOut: string, bufferSize: number, name: string, flags: number): number;
|
||||
static remove(repo: Repository, name: string): number;
|
||||
|
||||
14
types/nodegit/remote.d.ts
vendored
14
types/nodegit/remote.d.ts
vendored
@ -31,21 +31,21 @@ export class Remote {
|
||||
static createWithFetchspec(repo: Repository, name: string, url: string, fetch: string): Promise<Remote>;
|
||||
static delete(repo: Repository, name: string): Promise<number>;
|
||||
static initCallbacks(opts: RemoteCallbacks, version: number): number;
|
||||
static isValidName(remoteName: string): number;
|
||||
static isValidName(remoteName: string): boolean;
|
||||
static list(repo: Repository): Promise<any[]>;
|
||||
static lookup(repo: Repository, name: string | Remote, callback: Function): Promise<Remote>;
|
||||
static lookup(repo: Repository, name: string | Remote, callback?: Function): Promise<Remote>;
|
||||
static setAutotag(repo: Repository, remote: string, value: number): number;
|
||||
static setPushurl(repo: Repository, remote: string, url: string): number;
|
||||
static setUrl(repo: Repository, remote: string, url: string): number;
|
||||
|
||||
autotag(): number;
|
||||
connect(direction: Enums.DIRECTION, callbacks: RemoteCallbacks, callback: Function): Promise<number>;
|
||||
connect(direction: Enums.DIRECTION, callbacks: RemoteCallbacks, callback?: Function): Promise<number>;
|
||||
connected(): number;
|
||||
defaultBranch(): Promise<Buf>;
|
||||
disconnect(): Promise<void>;
|
||||
download(refSpecs: any[], opts: FetchOptions, callback: Function): Promise<number>;
|
||||
download(refSpecs: any[], opts?: FetchOptions, callback?: Function): Promise<number>;
|
||||
dup(): Promise<Remote>;
|
||||
fetch(refSpecs: any[], opts: FetchOptions, message: string, callback: Function): Promise<number>;
|
||||
fetch(refSpecs: any[], opts: FetchOptions, message: string, callback?: Function): Promise<number>;
|
||||
|
||||
free(): void;
|
||||
getFetchRefspecs(): Promise<any[]>;
|
||||
@ -55,14 +55,14 @@ export class Remote {
|
||||
owner(): Repository;
|
||||
prune(callbacks: RemoteCallbacks): number;
|
||||
pruneRefs(): number;
|
||||
push(refSpecs: any[], options: PushOptions, callback: Function): Promise<number>;
|
||||
push(refSpecs: any[], options?: PushOptions, callback?: Function): Promise<number>;
|
||||
pushurl(): string;
|
||||
refspecCount(): number;
|
||||
stats(): TransferProgress;
|
||||
|
||||
stop(): void;
|
||||
updateTips(callbacks: RemoteCallbacks, updateFetchhead: number, downloadTags: number, reflogMessage: string): number;
|
||||
upload(refspecs: Strarray, opts: PushOptions): number;
|
||||
upload(refspecs: Strarray, opts?: PushOptions): number;
|
||||
url(): string;
|
||||
/**
|
||||
* Lists advertised references from a remote. You must connect to the remote before using referenceList.
|
||||
|
||||
42
types/nodegit/repository.d.ts
vendored
42
types/nodegit/repository.d.ts
vendored
@ -18,6 +18,10 @@ import { Merge } from './merge';
|
||||
import { MergeOptions } from './merge-options';
|
||||
import { Refdb } from './ref-db';
|
||||
import { Revwalk } from './rev-walk';
|
||||
import { StatusFile } from './status-file';
|
||||
import { StatusOptions } from './status-options';
|
||||
import { DiffLine } from './diff-line';
|
||||
import { Treebuilder } from './tree-builder';
|
||||
|
||||
export interface RepositoryInitOptions {
|
||||
description: string;
|
||||
@ -46,7 +50,7 @@ export class Repository {
|
||||
config(): Promise<Config>;
|
||||
configSnapshot(): Promise<Config>;
|
||||
detachHead(): number;
|
||||
fetchheadForeach(callback: Function): Promise<any>;
|
||||
fetchheadForeach(callback?: Function): Promise<any>;
|
||||
|
||||
free(): void;
|
||||
getNamespace(): string;
|
||||
@ -57,7 +61,7 @@ export class Repository {
|
||||
isBare(): number;
|
||||
isEmpty(): number;
|
||||
isShallow(): number;
|
||||
mergeheadForeach(callback: Function): Promise<any>;
|
||||
mergeheadForeach(callback?: Function): Promise<any>;
|
||||
messageRemove(): number;
|
||||
odb(): Promise<Odb>;
|
||||
path(): string;
|
||||
@ -103,7 +107,7 @@ export class Repository {
|
||||
* Lookup reference names for a repository.
|
||||
*/
|
||||
getReferenceNames(type: Reference.TYPE): Promise<string[]>;
|
||||
getCommit(string: string | Oid): Promise<Commit>;
|
||||
getCommit(string: string | Commit| Oid): Promise<Commit>;
|
||||
/**
|
||||
* Retrieve the blob represented by the oid.
|
||||
*/
|
||||
@ -128,7 +132,7 @@ export class Repository {
|
||||
/**
|
||||
* Deletes a tag from a repository by the tag name.
|
||||
*/
|
||||
deleteTagByName(Short: string): Promise<any>;
|
||||
deleteTagByName(Short: string): Promise<number>;
|
||||
/**
|
||||
* Instantiate a new revision walker for browsing the Repository"s history. See also Commit.prototype.history()
|
||||
*/
|
||||
@ -141,16 +145,16 @@ export class Repository {
|
||||
* Retrieve the commit that HEAD is currently pointing to
|
||||
*/
|
||||
getHeadCommit(): Promise<Commit>;
|
||||
createCommit(updateRef: string, author: Signature, committer: Signature, message: string, Tree: Tree | Oid | string, parents: any[]): Promise<Oid>;
|
||||
createCommit(updateRef: string, author: Signature, committer: Signature, message: string, Tree: Tree | Oid | string, parents: Array<string | Commit | Oid>, callback?: Function): Promise<Oid>;
|
||||
/**
|
||||
* Creates a new commit on HEAD from the list of passed in files
|
||||
*/
|
||||
createCommitOnHead(filesToAdd: any[], author: Signature, committer: Signature, message: string): Promise<Oid>;
|
||||
createCommitOnHead(filesToAdd: string[], author: Signature, committer: Signature, message: string): Promise<Oid>;
|
||||
/**
|
||||
* Create a blob from a buffer
|
||||
*/
|
||||
createBlobFromBuffer(buffer: Buffer): Oid;
|
||||
treeBuilder(tree: Tree): any;
|
||||
treeBuilder(tree: Tree): Promise<Treebuilder>;
|
||||
/**
|
||||
* Gets the default signature for the default user and now timestamp
|
||||
*/
|
||||
@ -158,20 +162,20 @@ export class Repository {
|
||||
/**
|
||||
* Lists out the remotes in the given repository.
|
||||
*/
|
||||
getRemotes(Optional: Function): Promise<Object>;
|
||||
getRemotes(callback?: Function): Promise<Remote[]>;
|
||||
/**
|
||||
* Gets a remote from the repo
|
||||
*/
|
||||
getRemote(remote: string | Remote, callback: Function): Promise<Remote>;
|
||||
getRemote(remote: string | Remote, callback?: Function): Promise<Remote>;
|
||||
/**
|
||||
* Fetches from a remote
|
||||
*/
|
||||
fetch(remote: string | Remote, fetchOptions: Object | FetchOptions): Promise<void>;
|
||||
fetch(remote: string | Remote, fetchOptions?: FetchOptions): Promise<void>;
|
||||
/**
|
||||
* Fetches from all remotes. This is done in series due to deadlocking issues with fetching from many remotes that can happen.
|
||||
*/
|
||||
fetchAll(fetchOptions: Object | FetchOptions, callback: Function): Promise<void>;
|
||||
mergeBranches(to: string | Reference, from: string | Reference, signature: Signature, mergePreference: Merge.PREFERENCE, mergeOptions: MergeOptions): Promise<Oid>;
|
||||
fetchAll(fetchOptions?: FetchOptions, callback?: Function): Promise<void>;
|
||||
mergeBranches(to: string | Reference, from: string | Reference, signature: Signature, mergePreference: Merge.PREFERENCE, mergeOptions?: MergeOptions): Promise<Oid>;
|
||||
/**
|
||||
* Rebases a branch onto another branch
|
||||
*/
|
||||
@ -180,11 +184,11 @@ export class Repository {
|
||||
/**
|
||||
* Get the status of a repo to it's working directory
|
||||
*/
|
||||
getStatus(opts: any): Promise<any[]>;
|
||||
getStatus(opts?: StatusOptions): Promise<StatusFile[]>;
|
||||
/**
|
||||
* Get extended statuses of a repo to it's working directory. Status entries have status, headToIndex delta, and indexToWorkdir deltas
|
||||
*/
|
||||
getStatusExt(opts: any): Promise<any[]>;
|
||||
getStatusExt(opts?: StatusOptions): Promise<StatusFile[]>;
|
||||
/**
|
||||
* Get the names of the submodules in the repository.
|
||||
*/
|
||||
@ -192,19 +196,19 @@ export class Repository {
|
||||
/**
|
||||
* This will set the HEAD to point to the reference and then attempt to update the index and working tree to match the content of the latest commit on that reference
|
||||
*/
|
||||
checkoutRef(reference: Reference, opts: Object | CheckoutOptions): Promise<any>;
|
||||
checkoutRef(reference: Reference, opts?: CheckoutOptions): Promise<Reference>;
|
||||
/**
|
||||
* This will set the HEAD to point to the local branch and then attempt to update the index and working tree to match the content of the latest commit on that branch
|
||||
*/
|
||||
checkoutBranch(branch: string | Reference, opts: Object | CheckoutOptions): Promise<any>;
|
||||
checkoutBranch(branch: string | Reference, opts?: CheckoutOptions): Promise<Reference>;
|
||||
/**
|
||||
* Stages or unstages line selection of a specified file
|
||||
*/
|
||||
stageFilemode(filePath: string | any[], stageNew: boolean): Promise<number>;
|
||||
stageFilemode(filePath: string | string[], stageNew: boolean): Promise<number>;
|
||||
/**
|
||||
* Stages or unstages line selection of a specified file
|
||||
*/
|
||||
stageLines(filePath: string, newLines: any[], isStaged: boolean): Promise<number>;
|
||||
stageLines(filePath: string, newLines: DiffLine[], isStaged: boolean): Promise<number>;
|
||||
/**
|
||||
* Returns true if the repository is in the default NONE state.
|
||||
*/
|
||||
@ -236,7 +240,7 @@ export class Repository {
|
||||
/**
|
||||
* Discard line selection of a specified file. Assumes selected lines are unstaged.
|
||||
*/
|
||||
discardLines(filePath: string, selectedLines: any[]): Promise<number>;
|
||||
discardLines(filePath: string, selectedLines: DiffLine[]): Promise<number>;
|
||||
/**
|
||||
* Grabs a fresh copy of the index from the repository. Invalidates all previously grabbed indexes
|
||||
*/
|
||||
|
||||
2
types/nodegit/rev-walk.d.ts
vendored
2
types/nodegit/rev-walk.d.ts
vendored
@ -38,7 +38,7 @@ export class Revwalk {
|
||||
/**
|
||||
* 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).
|
||||
*/
|
||||
walk(oid: Oid, callback: Function): Commit;
|
||||
walk(oid: Oid, callback?: Function): Commit;
|
||||
/**
|
||||
* Walk the history grabbing commits until the checkFn called with the current commit returns false.
|
||||
*/
|
||||
|
||||
11
types/nodegit/revert.d.ts
vendored
11
types/nodegit/revert.d.ts
vendored
@ -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>;
|
||||
}
|
||||
|
||||
6
types/nodegit/stash.d.ts
vendored
6
types/nodegit/stash.d.ts
vendored
@ -37,10 +37,10 @@ export interface StashApplyOptions {
|
||||
}
|
||||
|
||||
export class Stash {
|
||||
static apply(repo: Repository, index: number, options: StashApplyOptions): Promise<number>;
|
||||
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: any): Promise<number>;
|
||||
static pop(repo: Repository, index: number, options: StashApplyOptions): Promise<number>;
|
||||
static foreach(repo: Repository, callback?: Function): Promise<number>;
|
||||
static pop(repo: Repository, index: number, options?: StashApplyOptions): Promise<number>;
|
||||
static save(repo: Repository, stasher: Signature, message: string, flags: number): Promise<Oid>;
|
||||
}
|
||||
|
||||
6
types/nodegit/status-entry.d.ts
vendored
6
types/nodegit/status-entry.d.ts
vendored
@ -1,7 +1,7 @@
|
||||
import { DiffDelta } from './diff-delta';
|
||||
|
||||
export class StatusEntry {
|
||||
status: number;
|
||||
headToIndex: DiffDelta;
|
||||
indexToWorkdir: DiffDelta;
|
||||
status(): number;
|
||||
headToIndex(): DiffDelta;
|
||||
indexToWorkdir(): DiffDelta;
|
||||
}
|
||||
|
||||
8
types/nodegit/status-file-options.d.ts
vendored
Normal file
8
types/nodegit/status-file-options.d.ts
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import { StatusEntry } from './status-entry';
|
||||
|
||||
export interface StatusFileOptions {
|
||||
path?: string;
|
||||
status?: number;
|
||||
entry?: StatusEntry;
|
||||
[key: string]: any;
|
||||
}
|
||||
20
types/nodegit/status-file.d.ts
vendored
Normal file
20
types/nodegit/status-file.d.ts
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
import { DiffDelta } from './diff-delta';
|
||||
import { StatusFileOptions } from './status-file-options';
|
||||
|
||||
export class StatusFile {
|
||||
constructor(args: StatusFileOptions);
|
||||
headToIndex(): DiffDelta;
|
||||
indexToWorkdir(): DiffDelta;
|
||||
inIndex(): boolean;
|
||||
inWorkingTree(): boolean;
|
||||
isConflicted(): boolean;
|
||||
isDeleted(): boolean;
|
||||
isIgnored(): boolean;
|
||||
isModified(): boolean;
|
||||
isNew(): boolean;
|
||||
isRenamed(): boolean;
|
||||
isTypechange(): boolean;
|
||||
path(): string;
|
||||
status(): string[];
|
||||
statusBit(): number;
|
||||
}
|
||||
2
types/nodegit/status-list.d.ts
vendored
2
types/nodegit/status-list.d.ts
vendored
@ -3,7 +3,7 @@ import { DiffPerfdata } from './diff-perf-data';
|
||||
import { StatusOptions } from './status-options';
|
||||
|
||||
export class StatusList {
|
||||
static create(repo: Repository, opts: StatusOptions): Promise<StatusList>;
|
||||
static create(repo: Repository, opts?: StatusOptions): Promise<StatusList>;
|
||||
|
||||
entrycount(): number;
|
||||
|
||||
|
||||
1
types/nodegit/status-options.d.ts
vendored
1
types/nodegit/status-options.d.ts
vendored
@ -5,4 +5,5 @@ export interface StatusOptions {
|
||||
show?: number;
|
||||
flags?: number;
|
||||
pathspec?: Strarray;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
6
types/nodegit/status.d.ts
vendored
6
types/nodegit/status.d.ts
vendored
@ -1,7 +1,7 @@
|
||||
import { Repository } from './repository';
|
||||
import { StatusList } from './status-list';
|
||||
import { StatusEntry } from './status-entry';
|
||||
import { StatusOptions } from './status-options';
|
||||
import { StatusEntry } from './status-entry';
|
||||
|
||||
export namespace Status {
|
||||
const enum STATUS {
|
||||
@ -50,7 +50,7 @@ export namespace Status {
|
||||
export class Status {
|
||||
static byIndex(statuslist: StatusList, idx: number): StatusEntry;
|
||||
static file(repo: Repository, path: string): number;
|
||||
static foreach(repo: Repository, callback: Function, payload: any): Promise<number>;
|
||||
static foreachExt(repo: Repository, opts: StatusOptions, callback: Function, payload: any): Promise<number>;
|
||||
static foreach(repo: Repository, callback?: Function): Promise<number>;
|
||||
static foreachExt(repo: Repository, opts?: StatusOptions, callback?: Function): Promise<number>;
|
||||
static shouldIgnore(ignored: number, repo: Repository, path: string): number;
|
||||
}
|
||||
|
||||
1
types/nodegit/submodule-update-options.d.ts
vendored
1
types/nodegit/submodule-update-options.d.ts
vendored
@ -6,4 +6,5 @@ export interface SubmoduleUpdateOptions {
|
||||
checkoutOpts?: CheckoutOptions;
|
||||
fetchOpts?: FetchOptions;
|
||||
cloneCheckoutStrategy?: number;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
4
types/nodegit/submodule.d.ts
vendored
4
types/nodegit/submodule.d.ts
vendored
@ -46,7 +46,7 @@ export namespace Submodule {
|
||||
|
||||
export class Submodule {
|
||||
static addSetup(repo: Repository, url: string, path: string, useGitLink: number): Promise<Submodule>;
|
||||
static foreach(repo: Repository, callback: Function, payload: any): Promise<number>;
|
||||
static foreach(repo: Repository, callback?: Function): Promise<number>;
|
||||
static lookup(repo: Repository, name: string): Promise<Submodule>;
|
||||
static resolveUrl(repo: Repository, url: string): Promise<Buf>;
|
||||
static setBranch(repo: Repository, name: string, branch: string): number;
|
||||
@ -80,7 +80,7 @@ export class Submodule {
|
||||
*
|
||||
*
|
||||
*/
|
||||
update(init: number, options: SubmoduleUpdateOptions): Promise<number>;
|
||||
update(init: number, options?: SubmoduleUpdateOptions): Promise<number>;
|
||||
updateStrategy(): number;
|
||||
url(): string;
|
||||
wdId(): Oid;
|
||||
|
||||
6
types/nodegit/tree.d.ts
vendored
6
types/nodegit/tree.d.ts
vendored
@ -20,7 +20,7 @@ export class Tree {
|
||||
/**
|
||||
* Retrieves the tree pointed to by the oid
|
||||
*/
|
||||
static lookup(repo: Repository, id: string | Oid | Tree, callback: Function): Promise<Tree>;
|
||||
static lookup(repo: Repository, id: string | Oid | Tree, callback?: Function): Promise<Tree>;
|
||||
|
||||
entryById(id: Oid): TreeEntry;
|
||||
_entryByIndex(idx: number): TreeEntry;
|
||||
@ -38,11 +38,11 @@ export class Tree {
|
||||
/**
|
||||
* Diff two trees
|
||||
*/
|
||||
diff(tree: Tree, callback: Function): Promise<DiffFile[]>;
|
||||
diff(tree: Tree, callback?: Function): Promise<DiffFile[]>;
|
||||
/**
|
||||
* Diff two trees with options
|
||||
*/
|
||||
diffWithOptions(tree: Tree, options: Object, callback: Function): Promise<DiffFile[]>;
|
||||
diffWithOptions(tree: Tree, options?: Object, callback?: Function): Promise<DiffFile[]>;
|
||||
/**
|
||||
* Get an entry at the ith position.
|
||||
*/
|
||||
|
||||
@ -36,6 +36,7 @@
|
||||
"clone.d.ts",
|
||||
"commit.d.ts",
|
||||
"config.d.ts",
|
||||
"convenient-hunk.d.ts",
|
||||
"convenient-patch.d.ts",
|
||||
"cred-user-pass-payload.d.ts",
|
||||
"cred-username.d.ts",
|
||||
@ -47,7 +48,6 @@
|
||||
"diff-binary.d.ts",
|
||||
"diff-delta.d.ts",
|
||||
"diff-file.d.ts",
|
||||
"diff-hunk.d.ts",
|
||||
"diff-line.d.ts",
|
||||
"diff-options.d.ts",
|
||||
"diff-perf-data.d.ts",
|
||||
@ -102,6 +102,8 @@
|
||||
"signature.d.ts",
|
||||
"stash.d.ts",
|
||||
"status-entry.d.ts",
|
||||
"status-file-options.d.ts",
|
||||
"status-file.d.ts",
|
||||
"status-list.d.ts",
|
||||
"status-options.d.ts",
|
||||
"status.d.ts",
|
||||
@ -117,4 +119,4 @@
|
||||
"tree-update.d.ts",
|
||||
"tree.d.ts"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user