From 410d6a6c94108e622e9cf6c69aaeed73ad2abdb4 Mon Sep 17 00:00:00 2001 From: Jared Fraser Date: Tue, 18 Jan 2022 22:33:20 +1000 Subject: [PATCH] fix(types): fixed datetime types for optional argument (#192) Co-authored-by: Shinigami --- src/datatype.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/datatype.ts b/src/datatype.ts index 1da3caceb52..e5dac1f941d 100644 --- a/src/datatype.ts +++ b/src/datatype.ts @@ -95,7 +95,9 @@ 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; max?: number; precision?: number } + ): Date { if (typeof options === 'number') { options = { max: options,