From d9bac9dd7d637dfd6e580dc981abf8a8dbdb54f4 Mon Sep 17 00:00:00 2001 From: Yanick Champoux Date: Wed, 23 Oct 2019 13:28:13 -0400 Subject: [PATCH] index.js => ts --- src/{index.js => index.ts} | 4 +++- src/types.ts | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) rename src/{index.js => index.ts} (54%) diff --git a/src/index.js b/src/index.ts similarity index 54% rename from src/index.js rename to src/index.ts index ffdb8d5..d7458cb 100644 --- a/src/index.js +++ b/src/index.ts @@ -3,6 +3,8 @@ import u from 'updeep'; import Updux from './updux'; -export default function updux(config) { +import { UpduxConfig } from './types'; + +export default function updux(config: UpduxConfig) { return new Updux(config); } diff --git a/src/types.ts b/src/types.ts index 414d299..afdf4d1 100644 --- a/src/types.ts +++ b/src/types.ts @@ -8,3 +8,6 @@ export type UpduxAction = Action & Partial<{ export type Dictionary = { [key: string]: T }; export type Mutation = (payload: any, action: Action) => (state: S) => S ; + +export type UpduxConfig = Partial<{ +}>;