Skip to content

Commit fd73d49

Browse files
fix: use proper TypeScript imports for API types
- Import ResourceQuery and QueryVariables from local app-runtime types - Fix TypeScript parameter syntax error in makeQuerySingleResource - Address PR review comments about using proper types instead of any Addresses GitHub comments from henrikmv on PR #4325 Co-Authored-By: [email protected] <[email protected]>
1 parent 73f447f commit fd73d49

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
import type { ResourceQuery, QueryVariables } from 'capture-core-utils/types/app-runtime';
2+
13
export type QuerySingleResource =
2-
(resourceQuery: any, variables?: any) => Promise<any>;
4+
(resourceQuery: ResourceQuery, variables?: QueryVariables) => Promise<any>;

src/core_modules/capture-core/utils/api/makeQuerySingleResource.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
import type { ResourceQuery, QueryVariables } from 'capture-core-utils/types/app-runtime';
2+
13
export const makeQuerySingleResource = (query: any) =>
2-
async (resourceQuery: any, variables: any = {}) => {
4+
async (resourceQuery: ResourceQuery, variables: QueryVariables = {}) => {
35
const resourceQueries = {
46
[resourceQuery.resource]: resourceQuery,
57
};

0 commit comments

Comments
 (0)