Skip to content

Commit c03e7c3

Browse files
committed
fix(git): ambiguous reduce type
1 parent 7828841 commit c03e7c3

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

Diff for: src/git.ts

+9-7
Original file line numberDiff line numberDiff line change
@@ -295,14 +295,16 @@ export const gitGenerators: Record<string, Fig.Generator> = {
295295
remotes: {
296296
script: ["git", "--no-optional-locks", "remote", "-v"],
297297
postProcess: function (out) {
298-
const remoteURLs = out.split("\n").reduce((dict, line) => {
299-
const pair = line.split("\t");
300-
const remote = pair[0];
301-
const url = pair[1].split(" ")[0];
298+
const remoteURLs = out
299+
.split("\n")
300+
.reduce<Record<string, string>>((dict, line) => {
301+
const pair = line.split("\t");
302+
const remote = pair[0];
303+
const url = pair[1].split(" ")[0];
302304

303-
dict[remote] = url;
304-
return dict;
305-
}, {});
305+
dict[remote] = url;
306+
return dict;
307+
}, {});
306308

307309
return Object.keys(remoteURLs).map((remote) => {
308310
const url = remoteURLs[remote];

0 commit comments

Comments
 (0)