@nanostores/query
Advanced tools
Comparing version 0.2.9 to 0.2.10
@@ -42,5 +42,5 @@ import { MapStore, ReadableAtom } from "nanostores"; | ||
}) => Promise<Result>; | ||
export type MutateCb<Data> = Data extends void ? () => Promise<unknown> : (data: Data) => Promise<unknown>; | ||
export type MutateCb<Data, Result = unknown> = Data extends void ? () => Promise<Result> : (data: Data) => Promise<Result>; | ||
export type MutatorStore<Data = void, Result = unknown, E = Error> = MapStore<{ | ||
mutate: MutateCb<Data>; | ||
mutate: MutateCb<Data, Result>; | ||
data?: Result; | ||
@@ -50,3 +50,3 @@ loading?: boolean; | ||
}> & { | ||
mutate: MutateCb<Data>; | ||
mutate: MutateCb<Data, Result>; | ||
}; | ||
@@ -53,0 +53,0 @@ export declare const nanoquery: ({ cache, fetcher: globalFetcher, ...globalSettings }?: NanoqueryArgs) => readonly [<T = unknown, E = any>(keyInput: KeyInput, { fetcher, ...fetcherSettings }?: CommonSettings<T>) => FetcherStore<T, E>, <Data = void, Result = unknown, E_1 = any>(mutator: ManualMutator<Data, Result>) => MutatorStore<Data, Result, E_1>, { |
{ | ||
"name": "@nanostores/query", | ||
"version": "0.2.9", | ||
"version": "0.2.10", | ||
"description": "Tiny remote data fetching library for Nano Stores", | ||
"scripts": { | ||
"pub": "pnpm build && npm publish && git push && git push --tags", | ||
"prepublish": "pnpm build", | ||
@@ -78,3 +79,3 @@ "build": "vite build", | ||
}, | ||
"limit": "1631 B" | ||
"limit": "1626 B" | ||
} | ||
@@ -81,0 +82,0 @@ ], |
@@ -8,3 +8,3 @@ # Nano Stores Query | ||
- **Small**. 1.63 Kb (minified and gzipped). | ||
- **Small**. 1.62 Kb (minified and gzipped). | ||
- **Familiar DX**. If you've used [`swr`](https://swr.vercel.app/) or | ||
@@ -11,0 +11,0 @@ [`react-query`](https://react-query-v3.tanstack.com/), you'll get the same treatment, |
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
35816