Skip to content

Commit

Permalink
feat(typescript): add typings (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
Djaler authored and egoist committed May 13, 2019
1 parent 5887219 commit 75280f4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
"description": "Prefetch the route components of router-link in viewport.",
"main": "dist/index.js",
"module": "dist/index.esm.js",
"types": "types/index.d.ts",
"files": [
"dist"
"dist",
"types"
],
"scripts": {
"test": "npm run lint",
Expand Down
12 changes: 12 additions & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
declare module 'vue-router-prefetch' {
import { PluginFunction } from 'vue'

export interface RouterPrefetchOptions {
componentName?: string;
prefetch?: boolean;
}

const install: PluginFunction<RouterPrefetchOptions>

export default install
}

0 comments on commit 75280f4

Please sign in to comment.