@triplit/svelte 0.1.62 → 0.1.64
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +16 -0
- package/dist/index.svelte.d.ts +4 -4
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,21 @@
|
|
1
1
|
# @triplit/svelte
|
2
2
|
|
3
|
+
## 0.1.64
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 3809e4aa: Update svelte types
|
8
|
+
- Updated dependencies [b5374280]
|
9
|
+
- Updated dependencies [22b3e245]
|
10
|
+
- @triplit/client@0.4.7
|
11
|
+
|
12
|
+
## 0.1.63
|
13
|
+
|
14
|
+
### Patch Changes
|
15
|
+
|
16
|
+
- Updated dependencies [d11d57e2]
|
17
|
+
- @triplit/client@0.4.6
|
18
|
+
|
3
19
|
## 0.1.62
|
4
20
|
|
5
21
|
### Patch Changes
|
package/dist/index.svelte.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { ClientFetchResult, ClientQuery, ClientQueryBuilder, Models, SubscriptionOptions, TriplitClient, Unalias } from '@triplit/client';
|
1
|
+
import type { ClientFetchResult, ClientQuery, ClientQueryBuilder, CollectionNameFromModels, Models, SubscriptionOptions, TriplitClient, Unalias } from '@triplit/client';
|
2
2
|
import { WorkerClient } from '@triplit/client/worker-client';
|
3
3
|
/**
|
4
4
|
* A hook that subscribes to a query
|
@@ -10,13 +10,13 @@ import { WorkerClient } from '@triplit/client/worker-client';
|
|
10
10
|
* @param options.onRemoteFulfilled - An optional callback that is called when the remote query has been fulfilled.
|
11
11
|
* @returns An object containing the fetching state, the result of the query, any error that occurred, and a function to update the query
|
12
12
|
*/
|
13
|
-
export declare function useQuery<M extends Models
|
13
|
+
export declare function useQuery<M extends Models, CN extends CollectionNameFromModels<M>, Q extends ClientQuery<M, CN>>(client: TriplitClient<M> | WorkerClient<M>, query: ClientQueryBuilder<M, CN, Q>, options?: Partial<SubscriptionOptions>): {
|
14
14
|
fetching: boolean;
|
15
15
|
fetchingLocal: boolean;
|
16
16
|
fetchingRemote: boolean;
|
17
|
-
results: Unalias<ClientFetchResult<Q>> | undefined;
|
17
|
+
results: Unalias<ClientFetchResult<M, Q>> | undefined;
|
18
18
|
error: any;
|
19
|
-
updateQuery: (query: ClientQueryBuilder<Q>) => void;
|
19
|
+
updateQuery: (query: ClientQueryBuilder<M, CN, Q>) => void;
|
20
20
|
};
|
21
21
|
/**
|
22
22
|
* A hook that subscribes to the connection status of a client with the server
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@triplit/svelte",
|
3
3
|
"packageManager": "yarn@3.4.1",
|
4
|
-
"version": "0.1.
|
4
|
+
"version": "0.1.64",
|
5
5
|
"source": "./src/index.svelte.ts",
|
6
6
|
"main": "./dist/index.svelte.js",
|
7
7
|
"module": "./dist/index.svelte.js",
|
@@ -19,6 +19,7 @@
|
|
19
19
|
"scripts": {
|
20
20
|
"build": "svelte-package -t=false && tsc && yarn validate:types",
|
21
21
|
"build:watch": "svelte-package -w",
|
22
|
+
"lint": "yarn check",
|
22
23
|
"lint:build": "npx publint",
|
23
24
|
"publish-pkg": "node ../../scripts/npm-check-version-and-publish.js",
|
24
25
|
"check": "svelte-check --tsconfig ./tsconfig.json",
|
@@ -28,7 +29,7 @@
|
|
28
29
|
"/dist"
|
29
30
|
],
|
30
31
|
"dependencies": {
|
31
|
-
"@triplit/client": "^0.4.
|
32
|
+
"@triplit/client": "^0.4.7"
|
32
33
|
},
|
33
34
|
"devDependencies": {
|
34
35
|
"@sveltejs/package": "^2.3.0",
|