@nanostores/query
Advanced tools
Comparing version 0.2.2 to 0.2.3
@@ -7,3 +7,3 @@ import { MapStore, ReadableAtom } from "nanostores"; | ||
declare type KeyParts = SomeKey[]; | ||
declare type KeySelector = Key | Key[] | ((key: Key) => boolean); | ||
export declare type KeySelector = Key | Key[] | ((key: Key) => boolean); | ||
export declare type Fetcher<T> = (...args: KeyParts) => Promise<T>; | ||
@@ -39,3 +39,3 @@ declare type EventTypes = { | ||
data: Data; | ||
invalidate: (key: Key) => void; | ||
invalidate: (key: KeySelector) => void; | ||
getCacheUpdater: <T = unknown>(key: Key, shouldRevalidate?: boolean) => [(newValue?: T) => void, T | undefined]; | ||
@@ -42,0 +42,0 @@ }) => Promise<Result>; |
@@ -230,3 +230,3 @@ import { map, onStart, onStop, atom } from "nanostores"; | ||
store.setKey("loading", false); | ||
invalidateKeys(keysToInvalidate); | ||
keysToInvalidate.forEach(invalidateKeys); | ||
} | ||
@@ -233,0 +233,0 @@ }; |
{ | ||
"name": "@nanostores/query", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "Tiny remote data fetching library for Nano Stores", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34232