Skip to content

Commit

Permalink
fix: fixes type for ABILITY_TOKEN in casl-vue
Browse files Browse the repository at this point in the history
  • Loading branch information
stalniy committed Feb 14, 2024
1 parent 21e06c9 commit 1fbd46f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/casl-vue/src/useAbility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { inject, InjectionKey, provide } from 'vue';
import type { AnyAbility, Ability } from '@casl/ability';
import { reactiveAbility } from './reactiveAbility';

export const ABILITY_TOKEN: InjectionKey<Ability> = Symbol('ability');
export const ABILITY_TOKEN: InjectionKey<AnyAbility> = Symbol('ability');

export function useAbility<T extends AnyAbility = Ability>(): T {
const ability = inject<T>(ABILITY_TOKEN);
Expand Down

0 comments on commit 1fbd46f

Please sign in to comment.