From 29a0cd79eb39c9dde5b27833f56a1c1a2653846c Mon Sep 17 00:00:00 2001 From: Dolan Date: Thu, 8 Jun 2017 02:27:21 +0100 Subject: [PATCH] Added documentation --- types/nodegit/attr.d.ts | 6 ++++-- types/nodegit/branch.d.ts | 4 ++-- types/nodegit/nodegit-tests.ts | 4 ++++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/types/nodegit/attr.d.ts b/types/nodegit/attr.d.ts index 41c1aa5eb2..fdcf4dc56b 100644 --- a/types/nodegit/attr.d.ts +++ b/types/nodegit/attr.d.ts @@ -37,7 +37,8 @@ export class Attr { * @static * @param {Repository} repo - The repository containing the path. * @param {number} flags - A combination of GIT_ATTR_CHECK... flags. - * @param {string} path - The path to check for attributes. Relative paths are interpreted relative to the repo root. The file does not have to exist, but if it does not, then it will be treated as a plain file (not a directory). + * @param {string} path - The path to check for attributes. Relative paths are interpreted relative to the repo root. + * The file does not have to exist, but if it does not, then it will be treated as a plain file (not a directory). * @param {string} name - The name of the attribute to look up. * @returns {Promise} - Output of the value of the attribute. Use the GIT_ATTR_... * @@ -50,7 +51,8 @@ export class Attr { * @static * @param {Repository} repo - The repository containing the path. * @param {number} flags - A combination of GIT_ATTR_CHECK... flags. - * @param {string} path - The path to check for attributes. Relative paths are interpreted relative to the repo root. The file does not have to exist, but if it does not, then it will be treated as a plain file (not a directory). + * @param {string} path - The path to check for attributes. Relative paths are interpreted relative to the repo root. + * The file does not have to exist, but if it does not, then it will be treated as a plain file (not a directory). * @param {number} numAttr - The number of attributes being looked up * @param {string} names - An array of num_attr strings containing attribute names. * @returns {any[]} diff --git a/types/nodegit/branch.d.ts b/types/nodegit/branch.d.ts index 4c48d32101..0c52131a51 100644 --- a/types/nodegit/branch.d.ts +++ b/types/nodegit/branch.d.ts @@ -75,12 +75,12 @@ export class Branch { * @static * @param {Repository} repo * @param {string} branchName - * @param {number} branchType + * @param {Branch.BRANCH} branchType * @returns {Promise} * * @memberof Branch */ - static lookup(repo: Repository, branchName: string, branchType: number): Promise; + static lookup(repo: Repository, branchName: string, branchType: Branch.BRANCH): Promise; /** * * diff --git a/types/nodegit/nodegit-tests.ts b/types/nodegit/nodegit-tests.ts index e9bceb601e..c8d296ea09 100644 --- a/types/nodegit/nodegit-tests.ts +++ b/types/nodegit/nodegit-tests.ts @@ -47,3 +47,7 @@ let array = Git.Attr.getMany(repo, 1, "path", 1, "names"); result = Git.Attr.value("attr"); const blameOptions = new Git.BlameOptions(); + +Git.Branch.lookup(repo, "branch_name", Git.Branch.BRANCH.LOCAL).then(function (reference) { + // Use reference +});