Add start function to nodegit Tree.walk return type (#35698)

* Add start function to Tree.walk return type

* Add test
This commit is contained in:
billytrend
2019-05-28 13:40:14 -07:00
committed by Sheetal Nandi
parent 46b4037bf0
commit efc2561ca7
2 changed files with 8 additions and 1 deletions
+2
View File
@@ -13,6 +13,8 @@ const id = new Git.Oid();
const ref = new Git.Reference();
const tree = new Git.Tree();
tree.walk().start();
// AnnotatedCommit Tests
Git.AnnotatedCommit.fromFetchhead(repo, "branch_name", "remote_url", id).then((annotatedCommit) => {
+6 -1
View File
@@ -58,7 +58,12 @@ export class Tree {
/**
* Recursively walk the tree in breadth-first order. Fires an event for each entry.
*/
walk(blobsOnly?: boolean): NodeJS.EventEmitter;
walk(blobsOnly?: boolean): NodeJS.EventEmitter & {
/**
* Start walking the tree and emitting events. This should be called after event listeners have been attached.
*/
start: () => void;
};
/**
* Return the path of this tree, like /lib/foo/bar
*