Skip to content

Commit 3d902e0

Browse files
committed
Avoids as any
1 parent d99a0ad commit 3d902e0

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

src/env/node/git/sub-providers/stash.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,12 @@ export class StashGitSubProvider implements GitStashSubProvider {
123123
this.container,
124124
repoPath,
125125
s.sha,
126-
new GitCommitIdentity('You', undefined, new Date((s.date as any) * 1000)),
127-
new GitCommitIdentity('You', undefined, new Date((s.committedDate as any) * 1000)),
126+
new GitCommitIdentity('You', undefined, new Date((s.date as unknown as number) * 1000)),
127+
new GitCommitIdentity(
128+
'You',
129+
undefined,
130+
new Date((s.committedDate as unknown as number) * 1000),
131+
),
128132
message.split('\n', 1)[0] ?? '',
129133
s.parents.split(' '),
130134
message,

src/git/parsers/logParser.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ export function createLogParserWithFilesAndStats<T extends Record<string, unknow
366366
let fields: IterableIterator<string>;
367367

368368
for (const record of records) {
369-
entry = {} as any;
369+
entry = {} as unknown as ParsedEntryWithFilesAndStats<T>;
370370
files = [];
371371
fields = getLines(record, '\0');
372372

@@ -898,12 +898,16 @@ function parseLogEntry(
898898
repoPath!,
899899
entry.sha!,
900900

901-
new GitCommitIdentity(entry.author!, entry.authorEmail, new Date((entry.authorDate! as any) * 1000)),
901+
new GitCommitIdentity(
902+
entry.author!,
903+
entry.authorEmail,
904+
new Date((entry.authorDate! as unknown as number) * 1000),
905+
),
902906

903907
new GitCommitIdentity(
904908
entry.committer!,
905909
entry.committerEmail,
906-
new Date((entry.committedDate! as any) * 1000),
910+
new Date((entry.committedDate! as unknown as number) * 1000),
907911
),
908912
entry.summary?.split('\n', 1)[0] ?? '',
909913
entry.parentShas ?? [],

0 commit comments

Comments
 (0)