chore: rework types slightly for string or undefined instead of void

This commit is contained in:
blam
2020-12-29 14:26:28 +01:00
parent 82469a5d5a
commit 28bdc0328c
+4 -2
View File
@@ -110,9 +110,11 @@ export class Git {
}: {
dir: string;
fullName?: boolean;
}): Promise<string | void> {
}): Promise<string | undefined> {
const fullname = fullName ?? false;
return git.currentBranch({ fs, dir, fullname });
return git.currentBranch({ fs, dir, fullname }) as Promise<
string | undefined
>;
}
// https://isomorphic-git.org/docs/en/fetch