@spoosh/plugin-debounce 0.3.0 → 0.4.0
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.mts +1 -3
- package/dist/index.d.ts +1 -3
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -17,7 +17,6 @@ interface DebounceReadOptions {
|
|
|
17
17
|
*/
|
|
18
18
|
debounce?: RequestAwareDebounceFn;
|
|
19
19
|
}
|
|
20
|
-
type DebounceInfiniteReadOptions = DebounceReadOptions;
|
|
21
20
|
type DebounceWriteOptions = object;
|
|
22
21
|
type DebounceReadResult = object;
|
|
23
22
|
type DebounceWriteResult = object;
|
|
@@ -59,9 +58,8 @@ declare module "@spoosh/core" {
|
|
|
59
58
|
declare function debouncePlugin(): SpooshPlugin<{
|
|
60
59
|
readOptions: DebounceReadOptions;
|
|
61
60
|
writeOptions: DebounceWriteOptions;
|
|
62
|
-
infiniteReadOptions: DebounceInfiniteReadOptions;
|
|
63
61
|
readResult: DebounceReadResult;
|
|
64
62
|
writeResult: DebounceWriteResult;
|
|
65
63
|
}>;
|
|
66
64
|
|
|
67
|
-
export { type DebounceContext, type DebounceFn, type
|
|
65
|
+
export { type DebounceContext, type DebounceFn, type DebounceReadOptions, type DebounceReadResult, type DebounceValue, type DebounceWriteOptions, type DebounceWriteResult, type RequestAwareDebounceFn, debouncePlugin };
|
package/dist/index.d.ts
CHANGED
|
@@ -17,7 +17,6 @@ interface DebounceReadOptions {
|
|
|
17
17
|
*/
|
|
18
18
|
debounce?: RequestAwareDebounceFn;
|
|
19
19
|
}
|
|
20
|
-
type DebounceInfiniteReadOptions = DebounceReadOptions;
|
|
21
20
|
type DebounceWriteOptions = object;
|
|
22
21
|
type DebounceReadResult = object;
|
|
23
22
|
type DebounceWriteResult = object;
|
|
@@ -59,9 +58,8 @@ declare module "@spoosh/core" {
|
|
|
59
58
|
declare function debouncePlugin(): SpooshPlugin<{
|
|
60
59
|
readOptions: DebounceReadOptions;
|
|
61
60
|
writeOptions: DebounceWriteOptions;
|
|
62
|
-
infiniteReadOptions: DebounceInfiniteReadOptions;
|
|
63
61
|
readResult: DebounceReadResult;
|
|
64
62
|
writeResult: DebounceWriteResult;
|
|
65
63
|
}>;
|
|
66
64
|
|
|
67
|
-
export { type DebounceContext, type DebounceFn, type
|
|
65
|
+
export { type DebounceContext, type DebounceFn, type DebounceReadOptions, type DebounceReadResult, type DebounceValue, type DebounceWriteOptions, type DebounceWriteResult, type RequestAwareDebounceFn, debouncePlugin };
|
package/dist/index.js
CHANGED
|
@@ -38,7 +38,7 @@ function debouncePlugin() {
|
|
|
38
38
|
const eventTracers = /* @__PURE__ */ new Map();
|
|
39
39
|
return {
|
|
40
40
|
name: PLUGIN_NAME,
|
|
41
|
-
operations: ["read"
|
|
41
|
+
operations: ["read"],
|
|
42
42
|
lifecycle: {
|
|
43
43
|
onUnmount: (context) => {
|
|
44
44
|
const { path, method } = context;
|
package/dist/index.mjs
CHANGED
|
@@ -12,7 +12,7 @@ function debouncePlugin() {
|
|
|
12
12
|
const eventTracers = /* @__PURE__ */ new Map();
|
|
13
13
|
return {
|
|
14
14
|
name: PLUGIN_NAME,
|
|
15
|
-
operations: ["read"
|
|
15
|
+
operations: ["read"],
|
|
16
16
|
lifecycle: {
|
|
17
17
|
onUnmount: (context) => {
|
|
18
18
|
const { path, method } = context;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spoosh/plugin-debounce",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Request debouncing plugin for Spoosh - waits for inactivity before fetching",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@spoosh/core": ">=0.
|
|
36
|
+
"@spoosh/core": ">=0.15.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@spoosh/core": "0.
|
|
40
|
-
"@spoosh/test-utils": "0.
|
|
39
|
+
"@spoosh/core": "0.15.0",
|
|
40
|
+
"@spoosh/test-utils": "0.3.0"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"dev": "tsup --watch",
|