Skip to content

Commit

Permalink
feat(vue): adds typescript definitions
Browse files Browse the repository at this point in the history
Relates to #38
  • Loading branch information
Lena Stotska committed Apr 11, 2018
1 parent a78f73a commit a7eac4b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 28 deletions.
11 changes: 11 additions & 0 deletions packages/casl-vue/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import Vue from 'vue'
import { Ability } from '@casl/ability'

export function abilitiesPlugin(Vue: Vue, providedAbility?: Ability): void

declare module "vue/types/vue" {
interface Vue {
$ability: Ability
$can(action: string, subject: any, field?: string): boolean
}
}
33 changes: 5 additions & 28 deletions packages/casl-vue/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/casl-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"main": "dist/umd/index.js",
"module": "index.js",
"es2015": "dist/es6/index.js",
"typings": "./index.d.ts",
"repository": {
"type": "git",
"url": "[email protected]:stalniy/casl.git"
Expand Down

0 comments on commit a7eac4b

Please sign in to comment.