I'm trying to use nodegit to get the tree of a commit based on a reference or oid using Revparse, I thought the following code would work, however I'm getting getTree undefined errors:
return git.Repository.open(path_to_repo)
.then((repo) => git.Revparse.single(repo, "other"))
.then((commit) => commit.getTree());
How do I cast the object returned by Revparse to a commit?