Skip to content

Commit 91d722d

Browse files
authored
Merge pull request #11 from github/add-typescript-definition-file
Add typescript definition file
2 parents 2e64f34 + 197903b commit 91d722d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

index.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
interface Subscription {
2+
unsubscribe: () => void
3+
}
4+
5+
export default function subscribe(el: Element): Subscription;

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"repository": "github/paste-markdown",
66
"main": "dist/index.umd.js",
77
"module": "dist/index.esm.js",
8+
"types": "index.d.ts",
89
"scripts": {
910
"clean": "rm -rf dist",
1011
"lint": "eslint . && flow check",
@@ -20,7 +21,8 @@
2021
],
2122
"license": "MIT",
2223
"files": [
23-
"dist"
24+
"dist",
25+
"index.d.ts"
2426
],
2527
"devDependencies": {
2628
"@babel/core": "^7.3.4",

0 commit comments

Comments
 (0)