vue
vue copied to clipboard
Vue 2.7 directive type error
Version
2.7.10
Steps to reproduce
import Vue, { type ObjectDirective } from 'vue'
declare const vFoo: ObjectDirective<
any,
{
foobar: string;
}
>;
Vue.directive('foo', vFoo);
What is expected?
No type error
What is actually happening?
Argument of type 'ObjectDirective<any, { foobar: string; }>' is not assignable to parameter of type 'DirectiveOptions | DirectiveFunction | undefined'