Skip to content

Commit

Permalink
fix: Convert intersection type to union type for UseQueryReturnValue
Browse files Browse the repository at this point in the history
  • Loading branch information
ptbrowne committed Mar 1, 2021
1 parent 4b91ab4 commit b1a3827
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/cozy-client/src/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import { QueryDefinition } from './queries/dsl'
*/

/**
* @typedef {QueryState & FetchMoreAble} UseQueryReturnValue
* @typedef {QueryState|FetchMoreAble} UseQueryReturnValue
*/

/**
Expand Down
4 changes: 2 additions & 2 deletions packages/cozy-client/types/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export type ReduxStore = any;
export type Token = any;
export type ClientResponse = any;
export type Manifest = any;
export type QueryFetchStatus = "loading" | "loaded" | "pending" | "failed";
export type QueryFetchStatus = "failed" | "loading" | "pending" | "loaded";
export type QueryState = {
id: string;
definition: QueryDefinition;
Expand All @@ -25,7 +25,7 @@ export type QueryState = {
export type FetchMoreAble = {
fetchMore: Function;
};
export type UseQueryReturnValue = QueryState & FetchMoreAble;
export type UseQueryReturnValue = QueryState | FetchMoreAble;
/**
* A reference to a document (special case of a relationship used between photos and albums)
* https://docs.cozy.io/en/cozy-doctypes/docs/io.cozy.files/#references
Expand Down

0 comments on commit b1a3827

Please sign in to comment.