Skip to content

Commit 62df9d7

Browse files
committed
Add type declarations file to package for typescript support
1 parent d67b7a0 commit 62df9d7

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

index.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { DirectiveFunction, VueConstructor, ComponentOptions } from "vue";
2+
3+
export const version: string;
4+
export const focus: DirectiveFunction;
5+
export const mixin: VueConstructor | ComponentOptions<never>;

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"loose-envify": "^1.2.0"
1616
},
1717
"devDependencies": {
18+
"@types/vue": "^2.0.0",
1819
"eslint": "^1.10.3",
1920
"mkdirp": "^0.5.1",
2021
"rollup": "^0.21.2",
@@ -23,6 +24,7 @@
2324
},
2425
"files": [
2526
"index.js",
27+
"index.d.ts",
2628
"dist"
2729
],
2830
"homepage": "https://github.com/simplesmiler/vue-focus",
@@ -35,6 +37,7 @@
3537
],
3638
"license": "MIT",
3739
"main": "dist/vue-focus.common.js",
40+
"types": "index.d.ts",
3841
"peerDependencies": {
3942
"vue": "^2.0.0"
4043
},

0 commit comments

Comments
 (0)