@triplit/react 0.0.38-beta.1 → 0.0.38-beta.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
- import { TriplitClient, Models, CollectionNameFromModels, SubscriptionOptions } from '@triplit/client';
1
+ import { TriplitClient, Models, CollectionNameFromModels, SubscriptionOptions, ResultTypeFromModel, ModelFromModels } from '@triplit/client';
2
2
  export declare function useEntity<M extends Models<any, any> | undefined, CN extends CollectionNameFromModels<M>>(client: TriplitClient<M>, collectionName: CN, id: string, options?: SubscriptionOptions): {
3
3
  fetching: boolean;
4
4
  fetchingRemote: boolean;
5
- results: any;
5
+ results: ResultTypeFromModel<ModelFromModels<M, CN>> | undefined;
6
6
  error: any;
7
7
  };
@@ -1,7 +1,7 @@
1
- import { TriplitClient, ClientQuery, ClientQueryBuilder, SubscriptionOptions, CollectionNameFromModels, Models } from '@triplit/client';
2
- export declare function useQuery<M extends Models<any, any> | undefined, CN extends CollectionNameFromModels<M>>(client: TriplitClient<any>, query: ClientQueryBuilder<ClientQuery<M, CN>>, options?: SubscriptionOptions): {
1
+ import { ClientFetchResult, TriplitClient, ClientQuery, ClientQueryBuilder, SubscriptionOptions, CollectionNameFromModels, Models } from '@triplit/client';
2
+ export declare function useQuery<M extends Models<any, any> | undefined, CN extends CollectionNameFromModels<M>>(client: TriplitClient<any>, query: ClientQueryBuilder<M, CN>, options?: SubscriptionOptions): {
3
3
  fetching: boolean;
4
4
  fetchingRemote: boolean;
5
- results: (M extends Models<any, any> ? Map<string, import("packages/db/src/schema.js").ResultTypeFromModel<import("packages/db/src/db.js").ModelFromModels<M, CN>>> : M extends undefined ? Map<string, any> : never) | undefined;
5
+ results: ClientFetchResult<ClientQuery<M, CN>> | undefined;
6
6
  error: any;
7
7
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@triplit/react",
3
3
  "packageManager": "yarn@3.4.1",
4
- "version": "0.0.38-beta.1",
4
+ "version": "0.0.38-beta.2",
5
5
  "source": "./src/index.ts",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",
@@ -25,7 +25,7 @@
25
25
  "/dist"
26
26
  ],
27
27
  "dependencies": {
28
- "@triplit/client": "^0.0.38-beta.1"
28
+ "@triplit/client": "^0.0.38-beta.2"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@parcel/config-default": "^2.9.3",