index.js => ts

This commit is contained in:
Yanick Champoux 2019-10-23 13:28:13 -04:00
parent f092526ded
commit d9bac9dd7d
2 changed files with 6 additions and 1 deletions

View File

@ -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);
} }

View File

@ -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<{
}>;