Skip to content

Commit

Permalink
Add typings as mentioned in #9 (#11)
Browse files Browse the repository at this point in the history
* ➕ Added TypeScript typings and source map

* ➕ Added TypeScript typings and source map mentioned in #9
  • Loading branch information
dance2die committed Feb 10, 2019
1 parent ff6d146 commit f744e07
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
14 changes: 11 additions & 3 deletions README.md
@@ -1,7 +1,7 @@
# react-use-localstorage
[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors)

_depends on stable v16.8.0~_
_depends on stable v16.8.1~_

![version](https://img.shields.io/npm/v/react-use-localstorage.svg?style=flat-square)
![size](https://img.shields.io/bundlephobia/min/react-use-localstorage.svg?style=flat-square)
Expand Down Expand Up @@ -51,9 +51,15 @@ ReactDOM.render(<App />, rootElement);

![demo](react-use-localstorage.gif)

# Change Log
# Changelog

2.2.2
<details>
<summary><b>Expand Changelog</b></summary>

2.4.0
- Added TypeScript typings as suggested by @TheAifam5 in Issue #9

2.3.0
- Fixed a bug where initial value is returned all the time #7 by @lilasquared 🙏

2.2.0
Expand All @@ -78,6 +84,8 @@ ReactDOM.render(<App />, rootElement);
0.0.6
- Changed the language from JavaScript to TypeScript
- It has minimized the distribution file greatly
</details>

## Contributors

Thanks goes to these wonderful people ([emoji key](https://github.com/all-contributors/all-contributors#emoji-key)):
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -3,6 +3,7 @@
"version": "2.3.0",
"description": "Use Local Storage with React hooks",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "tsc && babel temp -d dist",
"prepare": "npm run build"
Expand Down
2 changes: 2 additions & 0 deletions tsconfig.json
Expand Up @@ -3,6 +3,8 @@
"target": "es5",
"module": "commonjs",
"declaration": true,
"declarationDir": "dist",
"declarationMap": true,
"outDir": "temp",
"rootDir": "src",
"strict": true,
Expand Down

0 comments on commit f744e07

Please sign in to comment.