Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type definition of numbers is incorrect #44

Open
luc122c opened this issue May 8, 2024 · 1 comment
Open

Type definition of numbers is incorrect #44

luc122c opened this issue May 8, 2024 · 1 comment

Comments

@luc122c
Copy link

luc122c commented May 8, 2024

This type definition is incorrect:

export function numbers(): number[];

The 'number' field in data is a string. There are two solutions to this:

  1. Update the definition to string[]
  2. Pass the value through the number constructor to make it a number

I'd be happy to open a PR for whichever solution is prefered. Personally, I'd prefer number to be an array of numbers :)

@zburke
Copy link

zburke commented Nov 1, 2024

Option 1 is correct even though it's not exactly intuitive. ISO-4217 includes many "numeric code" values with leading zeros such as 008 (Albanian Lek, ALL) and 032 (Argentine peso, ARS) among many others. The name for this field is unfortunate, given it does not reflect the type of value it contains.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants