From 215732fc2db0ab9e76a15ff7ffbea0542f0c1376 Mon Sep 17 00:00:00 2001 From: TheoryOfNekomata Date: Thu, 14 Apr 2022 12:58:01 +0800 Subject: [PATCH] Update types Make sure types are declared correctly. --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index f1dc9b7..fdd92c6 100644 --- a/src/index.ts +++ b/src/index.ts @@ -136,8 +136,8 @@ const DEFAULT_CARDS: string[] = [ "You don't have to be ashamed of using your own ideas", // ]; -export const getDefaultCards = () => DEFAULT_CARDS; +export const getDefaultCards = (): string[] => DEFAULT_CARDS; -export const generate = (cards = getDefaultCards()) => ( +export const generate = (cards = getDefaultCards()): string => ( cards[Math.floor(Math.random() * cards.length)] );