-
-
Notifications
You must be signed in to change notification settings - Fork 917
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
fix: remove redundant precision from datatype.datetime options #335
Conversation
#312 needs to be merged first (I know you know it, but just to be clear for other maintainers so they don't accidentally merge this 🙂) |
@Shinigami92 Did you link the wrong PR? |
Sorry, I think I loose the overview ... |
No worries! One step at the time :) |
The original DT types for this method looked like this:
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/b5bf4061b0811d2e16dc3c6b4c3c15881b73290f/types/faker/index.d.ts#L106-L107
When converting js to ts, it got accidentally typed taking all options of the
datatype.number
, but usingprecision
here makes no sense, as expected output should be aninteger
.new Date()
can handle floating numbers hereBut I think we should build the interface in a way, which makes more sense.
Additionally I made some changes in the code to prevent
precision
leaking intodatatype.number