Skip to content

Commit

Permalink
fix: fix Directive Interface
Browse files Browse the repository at this point in the history
  • Loading branch information
alireza-ab committed Apr 28, 2021
1 parent 819307c commit c0ee763
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/directives/helpers/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import { ObjectDirective as Vue3Directive, DirectiveBinding as Vue3DirectiveBind
interface Vue2DirectiveBinding {
modifiers: Record<string, boolean>;
}
interface Vue2Directive<T = any> {
interface Vue2Directive<T = HTMLInputElement> {
bind?: (el: T, binding: Vue2DirectiveBinding) => void;
unbind?: (el: T, binding: Vue2DirectiveBinding) => void;
}

type Directive = Vue2Directive | Vue3Directive;
interface Directive<T = HTMLInputElement> extends Vue2Directive<T>, Vue3Directive {}
type DirectiveBinding = Vue2DirectiveBinding | Vue3DirectiveBinding;

export { Vue2DirectiveBinding, Vue2Directive, Vue3Directive, Directive, DirectiveBinding };
export { Vue2DirectiveBinding, Vue2Directive, Vue3DirectiveBinding, Vue3Directive, Directive, DirectiveBinding };

0 comments on commit c0ee763

Please sign in to comment.