Skip to content

Commit 8059099

Browse files
committed
fix: use literal true and false in DiffResultTextFile | DiffResultBinaryFile to aid type assertions.
1 parent 0f75aa4 commit 8059099

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

test/unit/log.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ListLogSummary, SimpleGit } from 'typings';
1+
import { LogResult, SimpleGit } from 'typings';
22
import {
33
assertExecutedCommands,
44
assertExecutedCommandsContains,
@@ -523,7 +523,7 @@ ${START_BOUNDARY}207601debebc170830f2921acf2b6b27034c3b1f::2016-01-03 15:50:58 +
523523

524524
describe('deprecations', () => {
525525
it('supports ListLogSummary without generic type', async () => {
526-
const summary: Promise<ListLogSummary> = git.log({from: 'from', to: 'to'});
526+
const summary: Promise<LogResult> = git.log({from: 'from', to: 'to'});
527527
await closeWithSuccess();
528528

529529
expect(summary).not.toBe(undefined);

typings/response.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,14 @@ export interface DiffResultTextFile {
118118
changes: number;
119119
insertions: number;
120120
deletions: number;
121-
binary: boolean;
121+
binary: false;
122122
}
123123

124124
export interface DiffResultBinaryFile {
125125
file: string;
126126
before: number;
127127
after: number;
128-
binary: boolean;
128+
binary: true;
129129
}
130130

131131
export interface DiffResult {

0 commit comments

Comments
 (0)