@spoosh/plugin-prefetch 0.1.1 → 0.1.2

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 CHANGED
@@ -39,9 +39,17 @@ declare module "@spoosh/core" {
39
39
  *
40
40
  * @example
41
41
  * ```ts
42
- * // Setup
43
- * const plugins = [prefetchPlugin(), cachePlugin(), retryPlugin()];
44
- * const { prefetch } = createReactSpoosh(spoosh);
42
+ * import { Spoosh } from "@spoosh/core";
43
+ *
44
+ * const client = new Spoosh<ApiSchema, Error>("/api")
45
+ * .use([
46
+ * // ... other plugins
47
+ * prefetchPlugin(),
48
+ * cachePlugin(),
49
+ * retryPlugin(),
50
+ * ]);
51
+ *
52
+ * const { prefetch } = createReactSpoosh(client);
45
53
  *
46
54
  * // Basic prefetch
47
55
  * await prefetch((api) => api.posts.$get());
package/dist/index.d.ts CHANGED
@@ -39,9 +39,17 @@ declare module "@spoosh/core" {
39
39
  *
40
40
  * @example
41
41
  * ```ts
42
- * // Setup
43
- * const plugins = [prefetchPlugin(), cachePlugin(), retryPlugin()];
44
- * const { prefetch } = createReactSpoosh(spoosh);
42
+ * import { Spoosh } from "@spoosh/core";
43
+ *
44
+ * const client = new Spoosh<ApiSchema, Error>("/api")
45
+ * .use([
46
+ * // ... other plugins
47
+ * prefetchPlugin(),
48
+ * cachePlugin(),
49
+ * retryPlugin(),
50
+ * ]);
51
+ *
52
+ * const { prefetch } = createReactSpoosh(client);
45
53
  *
46
54
  * // Basic prefetch
47
55
  * await prefetch((api) => api.posts.$get());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spoosh/plugin-prefetch",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Prefetch plugin for Spoosh - preload data before it's needed",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -33,11 +33,11 @@
33
33
  }
34
34
  },
35
35
  "peerDependencies": {
36
- "@spoosh/core": ">=0.2.0"
36
+ "@spoosh/core": ">=0.3.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@spoosh/core": "0.2.0",
40
- "@spoosh/test-utils": "0.1.1"
39
+ "@spoosh/core": "0.3.0",
40
+ "@spoosh/test-utils": "0.1.3"
41
41
  },
42
42
  "scripts": {
43
43
  "dev": "tsup --watch",