Skip to content

Commit 60b71fd

Browse files
fix(types): fixed datetime types for optional argument (#192)
Co-authored-by: Shinigami <chrissi92@hotmail.de>
1 parent c0c913b commit 60b71fd

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/datatype.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ export class Datatype {
9595
* @method faker.datatype.datetime
9696
* @param options pass min OR max as number of milliseconds since 1. Jan 1970 UTC
9797
*/
98-
datetime(options): Date {
98+
datetime(
99+
options?: number | { min?: number; max?: number; precision?: number }
100+
): Date {
99101
if (typeof options === 'number') {
100102
options = {
101103
max: options,

0 commit comments

Comments
 (0)