How to handle the incompatible types in address.zipCodeByState() #759
Labels
c: locale
Permutes locale definitions
p: 1-normal
Nothing urgent
s: accepted
Accepted feature / Confirmed bug
Milestone
faker/src/address.ts
Lines 126 to 133 in f520968
faker/src/definitions/address.ts
Lines 7 to 13 in f520968
The following languages specify a
string[]
(4):The following locales specify
Parameters<Datatype['number']>
(1):AFAICT there is no way to access the
string[]
values using a string key and if there was a way the result would be incompatible with thedatatype.number()
function.I checked the
string[]
postcode_by_state
locale files and it is exactly like theirpostcode
locale file, so even if we remove them, the fallback to the normal zipCode method would work and return the same values.We have two choices:
string[]
valuesstring[]
from the type and the corresponding filesCreated from #541
The text was updated successfully, but these errors were encountered: