diff options
| author | Jared Fraser <[email protected]> | 2022-01-18 22:33:20 +1000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-01-18 13:33:20 +0100 |
| commit | 60b71fd257c2b95a6997f5aac516b88327a78f4b (patch) | |
| tree | 0f650e0cf702701f5e7b45e4b056138e9dc7d258 /src | |
| parent | c0c913bda061303a187c6e6b1bbf15ceca63c84f (diff) | |
| download | faker-60b71fd257c2b95a6997f5aac516b88327a78f4b.tar.xz faker-60b71fd257c2b95a6997f5aac516b88327a78f4b.zip | |
fix(types): fixed datetime types for optional argument (#192)
Co-authored-by: Shinigami <[email protected]>
Diffstat (limited to 'src')
| -rw-r--r-- | src/datatype.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/datatype.ts b/src/datatype.ts index 1da3cace..e5dac1f9 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, |
