-
-
Notifications
You must be signed in to change notification settings - Fork 919
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
Vet v6.0.0-alpha.5 types emitted types against v5.5.3 #305
Comments
It could help to look what the types were their, but keep in mind that also these could be out of sync from the source code and introduce false assumptions. The Date type issue explicitly showed how wrong type assumption can nearly introduce new bugs to us without covered by the tests 😬 We are still in alpha and on some places I even did not assign a type yet, to explicitly find out what the real type is. |
Here is a version of the types: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/291c346588768b8ea13472ff95bdacd659f67790/types/faker/index.d.ts Note that there are also some interfaces like https://github.com/DefinitelyTyped/DefinitelyTyped/blob/291c346588768b8ea13472ff95bdacd659f67790/types/faker/index.d.ts#L336 These could be helpful for https://github.com/faker-js/faker/pull/151/files#diff-a2a171449d862fe29692ce031981047d7ab755ae7f84c707aef80701b3ea0c80R202, but I think I will split this PR into multiple smaller once anyway |
Is there a tool to automatically compare the types? |
Reopened due to my PR not fixing every single type listed here |
@damienwebdev Would you like to update the description of this issue and notify me/us about what is still missing? |
We need to ensure that the types emitted from our packages are API compatible with the previous DefinitelyTyped package.
See:
faker.address.nearbyGPSCoordinate
(coordinate
is a ReadOnlyArray in DefinitelyTyped)faker.address.companyName
has an arg offormat
which should bestring | number
faker.database.column
is implicitly return typed asstring
in 6.0.0-alpha.5 but should be set to returnstring
faker.database.type()
is implicitly return typed asstring
in 6.0.0-alpha.5 but should be set to returnstring
faker.database.collation()
is implicitly return typed asstring
in 6.0.0-alpha.5 but should be set to returnstring
faker.database.engine()
is implicitly return typed asstring
in 6.0.0-alpha.5 but should be set to returnstring
faker.finance.currencyCode()
is return typedany
faker.finance.currencyName()
is return typedany
faker.finance.currencySymbol()
is return typedany
faker.hacker.abbreviation()
is implicitly return typed asstring
faker.hacker.adjective()
is implicitly return typed asstring
faker.hacker.noun()
is implicitly return typed asstring
faker.hacker.verb()
is implicitly return typed asstring
faker.hacker.ingverb()
is implicitly return typed asstring
faker.hacker.phrase()
is implicitly return typed asstring
I'm sure there are a few others, but we need to check type by type to ensure spec compatibility.
The text was updated successfully, but these errors were encountered: