Skip to content

Commit f46a15f

Browse files
committed
Generate type definition file
1 parent 1a6b544 commit f46a15f

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "react-click-away-listener",
3-
"version": "0.4.0",
3+
"version": "0.4.1",
44
"description": "A simple click away listener built with React Hooks",
55
"main": "dist/react-click-away-listener.js",
66
"module": "dist/react-click-away-listener.es.js",
7-
"types": "dist/react-click-away-listener.d.ts",
7+
"types": "build/index.d.ts",
88
"umd": "dist/react-click-away-listener.umd.js",
99
"scripts": {
1010
"test": "jest",

tsconfig.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
"compilerOptions": {
33
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
44
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
5-
"jsx": "react", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
6-
"outDir": "./build", /* Redirect output structure to the directory. */
5+
"jsx": "react", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
6+
"outDir": "./build", /* Redirect output structure to the directory. */
77
"rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
88
"strict": true, /* Enable all strict type-checking options. */
9+
"declaration": true, /* Generates corresponding '.d.ts' file. */
910
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
1011
},
1112
"exclude": ["node_modules", "build", "__tests__"]

0 commit comments

Comments
 (0)