Skip to content

Commit 49c4f87

Browse files
committed
Allow null mapStateToProps
1 parent a682ffd commit 49c4f87

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

preact.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ declare module 'unistore/preact' {
88
import { StateMapper, Store, ActionCreatorsObject, MappedActionCreators } from 'unistore';
99

1010
export function connect<T, S, K, I, A extends ActionCreatorsObject<K>>(
11-
mapStateToProps: string | Array<string> | StateMapper<T, K, I>,
11+
mapStateToProps: string | Array<string> | StateMapper<T, K, I> | null,
1212
actions?: A,
1313
): (
1414
Child: Preact.ComponentConstructor<T & I & MappedActionCreators<A>, S> | Preact.AnyComponent<T & I & MappedActionCreators<A>, S>

react.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ declare module 'unistore/react' {
99
import { StateMapper, Store, ActionCreatorsObject, MappedActionCreators } from 'unistore';
1010

1111
export function connect<T, S, K, I, A extends ActionCreatorsObject<K>>(
12-
mapStateToProps: string | Array<string> | StateMapper<T, K, I>,
12+
mapStateToProps: string | Array<string> | StateMapper<T, K, I> | null,
1313
actions?: A,
1414
): (
1515
Child: ((props: T & I & MappedActionCreators<A>) => React.ReactNode) | React.ComponentClass<T & I & MappedActionCreators<A>, S> | React.FC<T & I & MappedActionCreators<A>>

0 commit comments

Comments
 (0)