Skip to content

Commit aad467d

Browse files
committed
Typescript warning
1 parent 4f29917 commit aad467d

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

front/src/theme.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import settings from './settings';
22
import get_connected_user from './user';
33

4-
export function getColorConf (): object
4+
export function getColorConf (): ColorConfiguration
55
{
66
var theme = getTheme();
77
var colorConf;
@@ -18,7 +18,7 @@ export function getColorConf (): object
1818

1919
export function getColor (category: string): string
2020
{
21-
return getColorConf()[category] as string;
21+
return getColorConf()[category];
2222
}
2323

2424
function getTheme (): string

front/types/settings.d.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@ interface Settings
1010
default_theme: string,
1111
categories:
1212
{
13-
[key: string]:
14-
{
15-
[key: string]: string
16-
}
13+
[key: string]: ColorConfiguration
1714
},
1815
use_unsplash: boolean,
1916
unsplash_tags: string[],
2017
IGN_key: string,
2118
international_prefix: string
2219
}
20+
21+
interface ColorConfiguration
22+
{
23+
[x: string]: string;
24+
}

0 commit comments

Comments
 (0)