Skip to content

Commit

Permalink
Add typescript definition
Browse files Browse the repository at this point in the history
  • Loading branch information
roderickhsiao committed Jun 3, 2021
1 parent b2ac734 commit a86ffb7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-in-viewport",
"version": "1.0.0-alpha.16",
"version": "1.0.0-alpha.17",
"description": "Track React component in viewport using Intersection Observer API",
"author": "Roderick Hsiao <roderickhsiao@gmail.com>",
"license": "MIT",
Expand Down Expand Up @@ -79,6 +79,7 @@
},
"main": "dist/index.js",
"module": "dist/es/index.js",
"types": "dist/types/index.d.ts",
"bundlesize": [
{
"path": "./dist/*.js",
Expand All @@ -88,6 +89,5 @@
"path": "./dist/es/*.js",
"maxSize": "2.5 kB"
}
],
"types": "dist/types/index.d.ts"
]
}
7 changes: 4 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@
"src/**/*.js"
],
"compilerOptions": {
"target": "ES6",
"allowJs": true,
"declaration": true,
"emitDeclarationOnly": true,
"module": "commonjs",
"outDir": "dist/types",
"types": [],
"module": "commonjs"
"target": "ES6",
"types": []
},
"exclude": [
"./node_modules",
"./src/__tests__",
"./src/setupTests.js",
"./src/stories",
]
}
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9203,9 +9203,9 @@ react-addons-create-fragment@^15.6.2:
object-assign "^4.1.0"

react-aspect-ratio@^1.0.3:
version "1.0.42"
resolved "https://registry.yarnpkg.com/react-aspect-ratio/-/react-aspect-ratio-1.0.42.tgz#04bf3e4d11c484bc5638ef5b22b84fb428ebc809"
integrity sha512-TlDS7GZ6Fot6yMo1OYWrcxI/cggGsU4xsfXLastv6FfcZq0e99LeMq+OUbrlEjtOzi00QzNvkoj5T2vDqJNAmw==
version "1.0.49"
resolved "https://registry.yarnpkg.com/react-aspect-ratio/-/react-aspect-ratio-1.0.49.tgz#346863ebb7eec542b8a5a4d6548440bf95a88608"
integrity sha512-zSKVJdy7QjmFeWTNNoL+gLf4KugIVln6XdKNIxjY8yebJ0buCeKcKoEQPfxruSbPGFakFGVl/abtF9SDpauh/A==

react-clientside-effect@^1.2.2:
version "1.2.2"
Expand Down

0 comments on commit a86ffb7

Please sign in to comment.