Skip to content

Commit

Permalink
fix typescript for faker method types
Browse files Browse the repository at this point in the history
  • Loading branch information
lifeparticle committed Nov 3, 2023
1 parent 7516c07 commit 79f7d85
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions ui/src/pages/Generator/Data/utils/constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { faker } from "@faker-js/faker";
import { ChemicalElement, Unit, faker, } from "@faker-js/faker";

export const MYSQL_DATA_TYPES = [
{ value: "BIGINT", label: "Big Integer" },
Expand Down Expand Up @@ -43,7 +43,21 @@ export const JSON_DATA_TYPES = [
{ value: "NULL", label: "Null" },
];

export type fakerMethod = () => string | number | boolean;
export type fakerMethod = () =>
| string
| number
| boolean
| number[]
| string[]
| (string | number)[]
| bigint
| ChemicalElement
| Unit
| undefined
| Date
| Date[]
| (string | number | Date)[]
| void;

interface FakerDataType {
value: string;
Expand Down

0 comments on commit 79f7d85

Please sign in to comment.