From a9692c45775e0f27be701953690225ec3a1766d8 Mon Sep 17 00:00:00 2001 From: Moulik Aggarwal <68378241+moulik-deepsource@users.noreply.github.com> Date: Thu, 6 May 2021 13:43:33 +0530 Subject: [PATCH 1/2] Add return type for function We must specify return types as `void` when it is not returning any value. --- cli.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli.ts b/cli.ts index 69da5ec..1c829f7 100644 --- a/cli.ts +++ b/cli.ts @@ -5,7 +5,7 @@ */ import { fox, customfox } from "randomfox"; -function parse(custom: string) { +function parse(custom: string): void { if (custom) { console.log(` ===============Foxes=============== @@ -19,4 +19,4 @@ ${fox()} } } -export { parse } \ No newline at end of file +export { parse } From a06402c616dfa6ea7943935e680257576a22a995 Mon Sep 17 00:00:00 2001 From: Moulik Aggarwal <68378241+moulik-deepsource@users.noreply.github.com> Date: Thu, 6 May 2021 14:03:34 +0530 Subject: [PATCH 2/2] Update type for template literals --- cli.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli.ts b/cli.ts index 1c829f7..20fde89 100644 --- a/cli.ts +++ b/cli.ts @@ -9,7 +9,7 @@ function parse(custom: string): void { if (custom) { console.log(` ===============Foxes=============== -${customfox(custom.split(" "))} +${customfox(custom.split(" ")) as string} `); } else { console.log(`