@based/react 4.2.2 → 4.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -8,11 +8,11 @@ export declare const useAuthState: () => AuthState;
8
8
  export declare const useConnected: () => {
9
9
  connected: boolean;
10
10
  };
11
- export declare const useQuery: (name?: string, payload?: any, opts?: {
11
+ export declare const useQuery: <T = any>(name?: string, payload?: any, opts?: {
12
12
  persistent: boolean;
13
13
  }) => {
14
14
  loading: boolean;
15
- data?: any;
15
+ data?: T;
16
16
  checksum?: number;
17
17
  };
18
18
  export declare const useClient: () => BasedClient;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@based/react",
3
- "version": "4.2.2",
3
+ "version": "4.2.3",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
package/src/index.ts CHANGED
@@ -60,7 +60,7 @@ export const useConnected = () => {
60
60
  return { connected }
61
61
  }
62
62
 
63
- export const useQuery = (
63
+ export const useQuery = <T = any>(
64
64
  name?: string,
65
65
  payload?: any,
66
66
  opts?: {
@@ -68,7 +68,7 @@ export const useQuery = (
68
68
  }
69
69
  ): {
70
70
  loading: boolean
71
- data?: any
71
+ data?: T
72
72
  checksum?: number
73
73
  } => {
74
74
  const client: BasedClient = useContext(Ctx)