From 28bdc0328c084caaef95c5621f27046398339b7a Mon Sep 17 00:00:00 2001 From: blam Date: Tue, 29 Dec 2020 14:26:28 +0100 Subject: [PATCH] chore: rework types slightly for string or undefined instead of void --- packages/backend-common/src/scm/git.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/backend-common/src/scm/git.ts b/packages/backend-common/src/scm/git.ts index 9007449d8b..b0a1df6541 100644 --- a/packages/backend-common/src/scm/git.ts +++ b/packages/backend-common/src/scm/git.ts @@ -110,9 +110,11 @@ export class Git { }: { dir: string; fullName?: boolean; - }): Promise { + }): Promise { 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