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

fix(types): fixed datetime types for optional argument #192

Merged
merged 4 commits into from
Jan 18, 2022
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/datatype.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export class Datatype {
* @method faker.datatype.datetime
* @param options pass min OR max as number of milliseconds since 1. Jan 1970 UTC
*/
datetime(options): Date {
datetime(options?: number | { min?: number | undefined; max?: number | undefined }): Date {
jared-fraser marked this conversation as resolved.
Show resolved Hide resolved
if (typeof options === 'number') {
options = {
max: options,
Expand Down