currency-codes icon indicating copy to clipboard operation
currency-codes copied to clipboard

Type definition of `numbers` is incorrect

Open luc122c opened this issue 9 months ago • 1 comments

This type definition is incorrect: https://github.com/freeall/currency-codes/blob/6de7fe6c3cdbe094b917dad7de77af0d9141cae5/index.d.ts#L18

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 :)

luc122c avatar May 08 '24 21:05 luc122c