-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshared-kernel.d.ts
50 lines (38 loc) · 1.02 KB
/
shared-kernel.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
type CurrencyCode = string;
type CurrencyItem = {
code: CurrencyCode;
label: string;
};
type CurrenciesValues = {
[key: CurrencyCode]: number;
};
interface CurrenciesStore {
activeCurrency: CurrencyCode;
setActiveCurrency: (activeCurrency: CurrencyCode) => void;
currencies: CurrencyItem[];
getCurrencies: () => Promise<CurrencyItem[]>;
lastSync: number;
rates: {
[key: CurrencyCode]: {
[key: CurrencyCode]: number;
};
};
selectedCurrencies: CurrencyCode[];
setSelectedCurrencies: (
selectedCurrencies: CurrenciesStore['selectedCurrencies'],
) => void;
deleteSelectedCurrency: (deletedCode: CurrencyCode) => void;
values: CurrenciesValues;
setValues: (values: CurrenciesValues) => void;
}
interface CurrenciesInterface {
[key: string]: string;
}
interface FlagsIconsInterface {
[key: string]: number;
}
declare module '@assets/flags/flagsIndex' {
const FLAGS: FlagsIconsInterface;
export = FLAGS;
}
type AllowedMathOperation = 'plus' | 'minus' | 'multiply' | 'divide' | 'equal';