mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
🤖 Merge PR #45971 Update country-data typings by @mikemaccana
Allow currencies to be used by key Include 'symbol' on currency Add tests
This commit is contained in:
parent
68523d9095
commit
67b69fb122
@ -7,6 +7,7 @@ lib.continents.africa.countries; // $ExpectType ReadonlyArray<Country>
|
||||
lib.countries.all; // $ExpectType ReadonlyArray<Country>
|
||||
lib.countries.BY; // $ExpectType Country
|
||||
lib.currencies.all; // $ExpectType ReadonlyArray<Currency>
|
||||
lib.currencies.USD; // $ExpectType Currency
|
||||
lib.languages.all; // $ExpectType ReadonlyArray<Language>
|
||||
lib.regions.antarctica; // $ExpectType Region
|
||||
lib.regions.antarctica.countries; // $ExpectType ReadonlyArray<string>
|
||||
|
||||
4
types/country-data/index.d.ts
vendored
4
types/country-data/index.d.ts
vendored
@ -1,6 +1,7 @@
|
||||
// Type definitions for country-data 0.0
|
||||
// Project: https://github.com/OpenBookPrices/country-data
|
||||
// Definitions by: Logan Dam <https://github.com/biltongza>
|
||||
// Mike MacCana <https://github.com/mikemaccana>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.6
|
||||
|
||||
@ -20,6 +21,7 @@ export interface Currency {
|
||||
readonly code: string;
|
||||
readonly decimals: number;
|
||||
readonly name: string;
|
||||
readonly symbol: string;
|
||||
readonly number: number;
|
||||
}
|
||||
|
||||
@ -66,6 +68,8 @@ export const callingCountries: {
|
||||
};
|
||||
|
||||
export const currencies: {
|
||||
readonly [key: string]: Currency;
|
||||
} & {
|
||||
readonly all: ReadonlyArray<Currency>;
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user