index.js => ts
This commit is contained in:
parent
f092526ded
commit
d9bac9dd7d
@ -3,6 +3,8 @@ import u from 'updeep';
|
|||||||
|
|
||||||
import Updux from './updux';
|
import Updux from './updux';
|
||||||
|
|
||||||
export default function updux(config) {
|
import { UpduxConfig } from './types';
|
||||||
|
|
||||||
|
export default function updux(config: UpduxConfig) {
|
||||||
return new Updux(config);
|
return new Updux(config);
|
||||||
}
|
}
|
@ -8,3 +8,6 @@ export type UpduxAction = Action & Partial<{
|
|||||||
export type Dictionary<T> = { [key: string]: T };
|
export type Dictionary<T> = { [key: string]: T };
|
||||||
|
|
||||||
export type Mutation<S> = (payload: any, action: Action) => (state: S) => S ;
|
export type Mutation<S> = (payload: any, action: Action) => (state: S) => S ;
|
||||||
|
|
||||||
|
export type UpduxConfig = Partial<{
|
||||||
|
}>;
|
||||||
|
Loading…
Reference in New Issue
Block a user