Skip to content

Commit

Permalink
chore: useDataQuery type definition
Browse files Browse the repository at this point in the history
  • Loading branch information
JoakimSM authored Apr 29, 2021
1 parent fbc7c85 commit b8c63c0
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/core_modules/capture-core/flow/app-runtime_v2.x.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ declare module '@dhis2/app-runtime' {
[resourceId: string]: ResourceQuery,
|};

declare type QueryResultArray = Array<QueryResult>;
declare type QueryResultObject = {| [key: string]: QueryResult |};
declare type QueryResult = boolean | number | string | null | QueryResultArray | QueryResultObject;
declare type QueryResult = any;

declare type RefetchOptions = {|
variables?: QueryVariables
Expand Down Expand Up @@ -130,10 +128,10 @@ declare module '@dhis2/app-runtime' {
called: boolean,
loading: boolean,
error?: FetchError,
data?: QueryResult,
data: QueryResult,
engine: DataEngine,
refetch: QueryRefetchFunction,
|};

declare export function useDataQuery(query: Query, queryOptions: QueryOptions): QueryRenderInput;
declare export function useDataQuery(resourceQueries: ResourceQueries, queryOptions?: QueryOptions): QueryRenderInput;
}

0 comments on commit b8c63c0

Please sign in to comment.