Skip to content

Commit

Permalink
🐛 fixed esmodule Promise type on apiFetch
Browse files Browse the repository at this point in the history
  • Loading branch information
aexol committed Jan 2, 2023
1 parent 3c37a6e commit 9640fb3
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/typescript-node/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "typescript-node",
"version": "1.0.3",
"version": "1.0.4",
"description": "",
"private": true,
"main": "index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql-zeus-core/TreeToTS/functions/generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default `const handleFetchResponse = (response: Response): Promise<GraphQ
.catch(reject);
});
}
return response.json();
return response.json() as Promise<GraphQLResponse>;
};
export const apiFetch =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const handleFetchResponse = (response: Response): Promise<GraphQLResponse> => {
.catch(reject);
});
}
return response.json();
return response.json() as Promise<GraphQLResponse>;
};

export const apiFetch =
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql-zeus-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "graphql-zeus-core",
"version": "5.2.3",
"version": "5.2.4",
"private": false,
"main": "./lib/index.js",
"author": "GraphQL Editor, Artur Czemiel",
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql-zeus-jsonschema/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "graphql-zeus-jsonschema",
"version": "5.2.3",
"version": "5.2.4",
"private": false,
"main": "./lib/index.js",
"author": "GraphQL Editor, Artur Czemiel",
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql-zeus/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "graphql-zeus",
"version": "5.2.3",
"version": "5.2.4",
"private": false,
"scripts": {
"start": "ttsc --build tsconfig.build.json --watch",
Expand Down

0 comments on commit 9640fb3

Please sign in to comment.