@nanostores/react
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -1,4 +0,7 @@ | ||
import { MapStore, Store, StoreValue } from '../atom/index.js' | ||
import { MapStore, Store, StoreValue } from 'nanostores' | ||
export interface UseStoreOptions<SomeStore, Key extends string> { | ||
export interface UseStoreOptions< | ||
SomeStore, | ||
Key extends string | number | symbol | ||
> { | ||
keys?: SomeStore extends MapStore ? Key[] : never | ||
@@ -32,8 +35,7 @@ } | ||
SomeStore extends Store, | ||
Value extends StoreValue<Store>, | ||
Key extends keyof Value | ||
Key extends keyof StoreValue<Store> | ||
>( | ||
store: SomeStore, | ||
options?: UseStoreOptions<SomeStore, Key> | ||
): SomeStore extends MapStore ? Pick<Value, Key> : Value | ||
): SomeStore extends MapStore ? Pick<StoreValue<Store>, Key> : StoreValue<Store> | ||
@@ -40,0 +42,0 @@ /** |
{ | ||
"name": "@nanostores/react", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "React integration for Nano Stores, a tiny state manager with many atomic tree-shakable stores", | ||
@@ -29,3 +29,3 @@ "keywords": [ | ||
"peerDependencies": { | ||
"nanostores": "^0.5.0", | ||
"nanostores": "^0.5.2", | ||
"react": ">=16.8.0", | ||
@@ -32,0 +32,0 @@ "react-dom": ">=16.8.0" |
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
5321
88