Comparing version 6.2.0 to 6.3.0
CHANGELOG | ||
=== | ||
6.3.0 | ||
-- | ||
New Features | ||
- | ||
Created helper for nested cursor factories. | ||
6.2.0 | ||
@@ -4,0 +12,0 @@ -- |
{ | ||
"name": "fun-model", | ||
"version": "6.2.0", | ||
"version": "6.3.0", | ||
"description": "fun-model is pure functional implementation of FLUX architecture.", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
@@ -5,2 +5,3 @@ export interface IState { | ||
export declare function createNestedCursor<TState extends IState, TNestedState extends IState>(cursor: CursorType<TState>, nestedStateKey: string): CursorType<TNestedState>; | ||
export declare function createNestedCursorFactory<TRootState extends IState, TNestedState extends IState>(key: string): (cursor: CursorType<TRootState>) => CursorType<TNestedState>; | ||
export declare function isCursorFunction<TState extends IState>(cursor: CursorType<TState>): cursor is () => ICursor<TState>; | ||
@@ -7,0 +8,0 @@ export interface ICursor<TState> { |
@@ -12,2 +12,6 @@ "use strict"; | ||
exports.createNestedCursor = createNestedCursor; | ||
function createNestedCursorFactory(key) { | ||
return function (cursor) { return createNestedCursor(cursor, key); }; | ||
} | ||
exports.createNestedCursorFactory = createNestedCursorFactory; | ||
function isCursorFunction(cursor) { | ||
@@ -14,0 +18,0 @@ return typeof cursor == "function"; |
@@ -15,2 +15,6 @@ import * as h from './helpers'; | ||
export function createNestedCursorFactory<TRootState extends IState, TNestedState extends IState>(key: string) { | ||
return (cursor: CursorType<TRootState>) => createNestedCursor<TRootState, TNestedState>(cursor, key); | ||
} | ||
export function isCursorFunction<TState extends IState>(cursor: CursorType<TState>): cursor is () => ICursor<TState> { | ||
@@ -17,0 +21,0 @@ return typeof cursor == "function"; |
248983
1981