@marshal93/vue-directives
Version:
vue-directives with types
22 lines (21 loc) • 629 B
TypeScript
import { ObjectDirective, DirectiveHook, DirectiveBinding } from 'vue';
export interface IDirective<T, V> extends ObjectDirective {
bind?: DirectiveHook<T, null, V>;
mounted?: DirectiveHook<T, null, V>;
}
export interface IApp {
directive(name: string): IDirective<HTMLElement, any>;
directive(name: string, directive: IDirective<HTMLElement, any>): this;
}
export interface ITouchPositon {
x: number;
y: number;
}
export type { DirectiveBinding };
export interface IPosition {
x: number;
y: number;
}
export interface IOptions extends IPosition {
longTapTimer: number;
}