Browse Source

Update types

Make sure types are declared correctly.
master
TheoryOfNekomata 2 years ago
parent
commit
215732fc2d
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/index.ts

+ 2
- 2
src/index.ts View File

@@ -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)]
);

Loading…
Cancel
Save