Skip to content

Commit

Permalink
fix: strengthen typings for git.log (#775)
Browse files Browse the repository at this point in the history
  • Loading branch information
billiegoose committed Jul 9, 2019
1 parent f3b4ddb commit 311bd0b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ export interface CommitDescription {
gpgsig?: string; // PGP signature (if present)
}

export interface CommitDescriptionWithPayload extends CommitDescription {
export interface CommitDescriptionWithOid extends CommitDescription {
oid: string; // SHA1 object id of this commit
}

export interface CommitDescriptionWithPayload extends CommitDescriptionWithOid {
payload: string;
}

Expand Down Expand Up @@ -452,15 +456,15 @@ export function log(args: GitDir & {
ref?: string;
depth?: number;
since?: Date;
}): Promise<Array<CommitDescription>>;
}): Promise<Array<CommitDescriptionWithOid>>;
export function log(args: GitDir & {
core?: string;
fs?: any;
ref?: string;
depth?: number;
since?: Date;
signing: false;
}): Promise<Array<CommitDescription>>;
}): Promise<Array<CommitDescriptionWithOid>>;
export function log(args: GitDir & {
core?: string;
fs?: any;
Expand Down

0 comments on commit 311bd0b

Please sign in to comment.