Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vue 2.7 directive type error #12791

Closed
xiaoxiangmoe opened this issue Sep 20, 2022 · 1 comment · Fixed by #12792
Closed

Vue 2.7 directive type error #12791

xiaoxiangmoe opened this issue Sep 20, 2022 · 1 comment · Fixed by #12792

Comments

@xiaoxiangmoe
Copy link
Contributor

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'
@idleRain
Copy link

不明觉厉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants