Skip to content

Commit

Permalink
fix: fix ts types
Browse files Browse the repository at this point in the history
  • Loading branch information
joual committed Mar 23, 2020
1 parent 71a5b7e commit cd34c2b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<any, any>;
export type ErgonoMockShape = {
[k: string]: string | boolean | number | null | GraphQLFieldResolver<any, any> | ErgonoMockShape;
[k: string]: ErgonoMockShape | ErgonoMockLeaf | Array<ErgonoMockShape | ErgonoMockLeaf>;
};

export function ergonomock(
Expand Down

0 comments on commit cd34c2b

Please sign in to comment.