Skip to content

Commit

Permalink
feat: added the description of the genius
Browse files Browse the repository at this point in the history
  • Loading branch information
kurone-kito committed Sep 27, 2020
1 parent bd8f7ca commit 64481e7
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions packages/dantalion-i18n/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
import { Genius } from '@kurone-kito/dantalion-core';
import getResources from './resources';

getResources().then((t) => {
console.log(t('hello', { returnObjects: true }));
});
export interface GeniusType {
detail: string[];
keyword: string[];
name: string;
summary: string;
strategy: string[];
weak: string[];
}

export const getGeniusAsync = async (genius: Genius) => {
const result = (await getResources())<string | GeniusType>(
`genius.${genius}`,
{ returnObjects: true }
);
return typeof result === 'string' ? undefined : result;
};

0 comments on commit 64481e7

Please sign in to comment.