From cd34c2bfa58d3fb5f0f8d1bf532be2aa48b4b285 Mon Sep 17 00:00:00 2001 From: Joel Marcotte Date: Mon, 23 Mar 2020 12:23:04 -0400 Subject: [PATCH] fix: fix ts types --- src/mock.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mock.ts b/src/mock.ts index f7c0b4e..25404d5 100644 --- a/src/mock.ts +++ b/src/mock.ts @@ -28,8 +28,9 @@ defaultMockMap.set("String", () => random.words()); defaultMockMap.set("Boolean", () => random.boolean()); defaultMockMap.set("ID", () => `${random.integer(10000000, 100000)}`); +type ErgonoMockLeaf = string | boolean | number | null | Error | GraphQLFieldResolver; export type ErgonoMockShape = { - [k: string]: string | boolean | number | null | GraphQLFieldResolver | ErgonoMockShape; + [k: string]: ErgonoMockShape | ErgonoMockLeaf | Array; }; export function ergonomock(