Skip to content

asCommit

Attempt to view this object as a commit.

Signature

ts
class GitObject {
  asCommit(): Commit | null;
}

Returns

  • null | Commit

    Returns null if the object is not actually a commit.

Released under the MIT License.