diff --git a/types/nodegit/nodegit-tests.ts b/types/nodegit/nodegit-tests.ts index a908f8a58f..f611753448 100644 --- a/types/nodegit/nodegit-tests.ts +++ b/types/nodegit/nodegit-tests.ts @@ -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) => { diff --git a/types/nodegit/tree.d.ts b/types/nodegit/tree.d.ts index 50c29e8a3f..3232e5944c 100644 --- a/types/nodegit/tree.d.ts +++ b/types/nodegit/tree.d.ts @@ -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 *