From a059db0d730bbed71f9bba62f30231f634fbad40 Mon Sep 17 00:00:00 2001 From: andts Date: Wed, 28 Jun 2017 14:03:03 +0300 Subject: [PATCH] added typescript declaration file --- dist/index.d.ts | 12 ++++++++++++ package.json | 1 + 2 files changed, 13 insertions(+) create mode 100644 dist/index.d.ts diff --git a/dist/index.d.ts b/dist/index.d.ts new file mode 100644 index 0000000..e5947b9 --- /dev/null +++ b/dist/index.d.ts @@ -0,0 +1,12 @@ +import {Middleware} from "redux"; +import * as m from 'redux-localstorage-simple'; + +declare module 'redux-localstorage-simple' { + interface RLSOptions { + states?: string[]; + namespace?: string; + debounce?: number; + } + export function save(options?:RLSOptions):Middleware + export function load():object +} \ No newline at end of file diff --git a/package.json b/package.json index b24bc24..723a274 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "1.3.1", "description": "Save and load Redux state to and from LocalStorage. Supports Immutable.js data structures.", "main": "dist/index.js", + "types": "dist/index.d.ts", "scripts": { "clean": "rimraf dist", "build": "npm run build:dist && npm run build:test",