Socket
Socket
Sign inDemoInstall

sswr

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sswr - npm Package Compare versions

Comparing version 1.11.0 to 2.0.0

14

dist/sswr.d.ts

@@ -14,4 +14,4 @@ /// <reference types="svelte" />

error: import("svelte/store").Writable<E | undefined>;
mutate: (value: SWRMutateValue<D>, ops?: Partial<SWRMutateOptions<D>>) => void;
revalidate: (ops?: Partial<SWRRevalidateOptions<D>>) => void;
mutate: (value: SWRMutateValue<D>, ops?: Partial<SWRMutateOptions<D>>) => Promise<D>;
revalidate: (ops?: Partial<SWRRevalidateOptions<D>>) => Promise<D>;
clear: (ops?: Partial<CacheClearOptions>) => void;

@@ -70,2 +70,4 @@ isLoading: import("svelte/store").Readable<boolean>;

unsubscribe: () => void;
dataPromise: Promise<undefined> | Promise<D>;
revalidatePromise: Promise<undefined> | Promise<D>;
};

@@ -78,4 +80,4 @@ /**

error: import("svelte/store").Writable<E | undefined>;
mutate: (value: SWRMutateValue<D>, ops?: Partial<SWRMutateOptions<D>> | undefined) => void;
revalidate: (ops?: Partial<SWRRevalidateOptions<D>> | undefined) => void;
mutate: (value: SWRMutateValue<D>, ops?: Partial<SWRMutateOptions<D>> | undefined) => Promise<D>;
revalidate: (ops?: Partial<SWRRevalidateOptions<D>> | undefined) => Promise<D>;
clear: (ops?: Partial<CacheClearOptions>) => void;

@@ -90,7 +92,7 @@ isLoading: import("svelte/store").Readable<boolean>;

*/
export declare const mutate: <D = any>(key: SWRKey, value: SWRMutateValue<D>, options?: Partial<SWRMutateOptions<D>> | undefined) => void;
export declare const mutate: <D = any>(key: SWRKey, value: SWRMutateValue<D>, options?: Partial<SWRMutateOptions<D>> | undefined) => Promise<D>;
/**
* Revalidates the key and mutates the cache if needed.
*/
export declare const revalidate: <D>(key: SWRKey, options?: Partial<SWRRevalidateOptions<D>> | undefined) => void;
export declare const revalidate: <D>(key: SWRKey, options?: Partial<SWRRevalidateOptions<D>> | undefined) => Promise<D>;
/**

@@ -97,0 +99,0 @@ * Clear the specified keys from the cache. If no keys

{
"name": "sswr",
"version": "1.11.0",
"version": "2.0.0",
"description": "Svelte stale while revalidate (SWR) data fetching strategy",

@@ -35,4 +35,4 @@ "repository": "github.com/ConsoleTVs/sswr",

"dependencies": {
"swrev": "^3.0.0"
"swrev": "^4.0.0"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc