vue icon indicating copy to clipboard operation
vue copied to clipboard

Vue 2.7 directive type error

Open xiaoxiangmoe opened this issue 1 year ago • 0 comments

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'

xiaoxiangmoe avatar Sep 20 '22 07:09 xiaoxiangmoe