immutable-state-creator
Advanced tools
Comparing version 1.1.1 to 1.2.0
@@ -7,3 +7,3 @@ import { Record as ImmutableRecord, Map } from 'immutable'; | ||
export declare type GlobalState = Map<string, any>; | ||
export declare type LocalState<T> = ImmutableRecord<T> & Readonly<T>; | ||
export declare type State<T> = ImmutableRecord<T> & Readonly<T>; | ||
export declare type Selectors<T extends Record<string, any>> = { | ||
@@ -13,6 +13,6 @@ [K in keyof T]: (state: GlobalState) => T[K]; | ||
export interface StateObject<T extends Record<string, any>> { | ||
create: () => LocalState<T>; | ||
create: () => State<T>; | ||
get: <K extends keyof T>(k: K) => (s: GlobalState) => T[K]; | ||
set: <K extends keyof T>(k: K, v: T[K]) => (s: LocalState<T>) => LocalState<T>; | ||
toggle: <K extends keyof T>(k: K) => (s: LocalState<T>) => LocalState<T>; | ||
set: <K extends keyof T>(k: K, v: T[K]) => (s: State<T>) => State<T>; | ||
toggle: <K extends keyof T>(k: K) => (s: State<T>) => State<T>; | ||
selectors: Selectors<T>; | ||
@@ -19,0 +19,0 @@ namespace: string; |
{ | ||
"name": "immutable-state-creator", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"description": "utilities to create immutable state", | ||
@@ -16,10 +16,13 @@ "main": "./lib/index.js", | ||
"@types/jest": "^22.2.3", | ||
"@types/ramda": "^0.25.48", | ||
"jest": "^24.5.0", | ||
"ts-jest": "^23.10.5", | ||
"typescript": "^3.3.3", | ||
"immutable": "^4.0.0-rc.12" | ||
"typescript": "3.4.5", | ||
"immutable": "^4.0.0-rc.12", | ||
"ramda": "^0.25.0" | ||
}, | ||
"dependencies": {}, | ||
"peerDependencies": { | ||
"immutable": "^3.8.1 || ^4.0.0-rc.1" | ||
"immutable": "^3.8.1 || ^4.0.0-rc.1", | ||
"ramda": ">= 0.25.0" | ||
}, | ||
@@ -26,0 +29,0 @@ "author": "Yulong Ruan <ruanyu1@gmail.com>", |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
9039
2
7
13
140
1