@cnamts/vue-dot
Version:
Implementation of our Design System for the French Health Insurance
13 lines (10 loc) • 368 B
text/typescript
import { VueConstructor, DirectiveOptions } from 'vue';
export interface Directives {
[name: string]: DirectiveOptions;
}
/** Register directives in the global Vue instance */
export function registerDirectives(Vue: VueConstructor, directives: Directives): void {
Object.keys(directives).forEach((name: string) => {
Vue.directive(name, directives[name]);
});
}