Skip to content

Commit 59157a4

Browse files
author
Matt Mayer
authored
feat(finance): currency object (#1809)
1 parent 11a5f51 commit 59157a4

11 files changed

Lines changed: 1004 additions & 585 deletions

File tree

src/definitions/finance.ts

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import type { Currency } from '../modules/finance';
12
import type { LocaleEntry } from './definitions';
2-
33
/**
44
* The possible definitions related to finance.
55
*/
@@ -18,27 +18,12 @@ export type FinanceDefinitions = LocaleEntry<{
1818
credit_card: { [issuer: string]: string[] };
1919

2020
/**
21-
* Currencies by their full name and their symbols (e.g. `US Dollar` -> `USD` / `$`).
21+
* Currencies including their name, code and symbol (e.g. `US Dollar` / `USD` / `$`).
2222
*/
23-
currency: { [currencyName: string]: FinanceCurrencyEntryDefinitions };
23+
currency: Currency[];
2424

2525
/**
2626
* Types of transactions (e.g. `deposit`).
2727
*/
2828
transaction_type: string[];
2929
}>;
30-
31-
/**
32-
* The possible definitions related to currency entries.
33-
*/
34-
export interface FinanceCurrencyEntryDefinitions {
35-
/**
36-
* The code/short text/abbreviation for the currency (e.g. `USD`).
37-
*/
38-
code: string;
39-
40-
/**
41-
* The symbol for the currency (e.g. `$`).
42-
*/
43-
symbol: string;
44-
}

src/definitions/index.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@ export type { CompanyDefinitions } from './company';
99
export type { DatabaseDefinitions } from './database';
1010
export type { DateDefinitions, DateEntryDefinition } from './date';
1111
export type { Definitions, LocaleDefinition } from './definitions';
12-
export type {
13-
FinanceCurrencyEntryDefinitions,
14-
FinanceDefinitions,
15-
} from './finance';
12+
export type { FinanceDefinitions } from './finance';
1613
export type { HackerDefinitions } from './hacker';
1714
export type { InternetDefinitions } from './internet';
1815
export type { LocationDefinitions } from './location';

src/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ export type {
1111
DatabaseDefinitions,
1212
DateDefinitions,
1313
DateEntryDefinition,
14-
FinanceCurrencyEntryDefinitions,
1514
FinanceDefinitions,
1615
HackerDefinitions,
1716
InternetDefinitions,
@@ -53,7 +52,7 @@ export type { CompanyModule } from './modules/company';
5352
export type { DatabaseModule } from './modules/database';
5453
export type { DatatypeModule } from './modules/datatype';
5554
export type { DateModule } from './modules/date';
56-
export type { FinanceModule } from './modules/finance';
55+
export type { Currency, FinanceModule } from './modules/finance';
5756
export type { GitModule } from './modules/git';
5857
export type { HackerModule } from './modules/hacker';
5958
export type { HelpersModule } from './modules/helpers';

src/locales/el/finance/currency.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
export default {
2-
Ευρώ: {
1+
export default [
2+
{
3+
name: 'Ευρώ',
34
code: 'EUR',
45
symbol: '€',
56
},
6-
};
7+
];

0 commit comments

Comments
 (0)