You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No overload matches this call.
The last overload gave the following error.
Argument of type 'ComponentPublicInstanceConstructor<{ $: ComponentInternalInstance; $data: { title: string; }; $props: Partial<{}> & Omit<Readonly<{} & {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>; ... 10 more ...; $watch(source: string | Function, cb: Function, options?: WatchOptions<...> | undefined): Wa...' is not assignable to parameter of type 'ComponentOptionsWithObjectProps<Readonly<ComponentPropsOptions<Data>>, {}, { title: string; }, {}, { setTitle(title: string): void; }, ComponentOptionsMixin, ... 4 more ..., { ...; } | {}>'.
Type 'ComponentPublicInstanceConstructor<{ $: ComponentInternalInstance; $data: { title: string; }; $props: Partial<{}> & Omit<Readonly<{} & {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>; ... 10 more ...; $watch(source: string | Function, cb: Function, options?: WatchOptions<...> | undefined): Wa...' is not assignable to type 'ComponentOptionsBase<Readonly<({ [x: number]: string; } & { [iterator]?: IterableIterator<string> | undefined; length?: number | undefined; toString?: string | undefined; toLocaleString?: string | undefined; ... 19 more ...; flat?: unknown[] | undefined; }) | ({} & { ...; })>, ... 8 more ..., { ...; } | {}>'.
Types of property 'setup' are incompatible.
Type '((this: void, props: Readonly<LooseRequired<Readonly<{} & {}>>>, ctx: SetupContext<EmitsOptions>) => void | {} | RenderFunction | Promise<...>) | undefined' is not assignable to type '((this: void, props: Readonly<LooseRequired<Readonly<{ [x: number]: string; } & { [iterator]?: IterableIterator<string> | undefined; length?: number | undefined; toString?: string | undefined; toLocaleString?: string | undefined; ... 19 more ...; flat?: unknown[] | undefined; }> | Readonly<...>>>, ctx: SetupContext<...'.
Type '(this: void, props: Readonly<LooseRequired<Readonly<{} & {}>>>, ctx: SetupContext<EmitsOptions>) => void | {} | RenderFunction | Promise<...>' is not assignable to type '(this: void, props: Readonly<LooseRequired<Readonly<{ [x: number]: string; } & { [iterator]?: IterableIterator<string> | undefined; length?: number | undefined; toString?: string | undefined; toLocaleString?: string | undefined; ... 19 more ...; flat?: unknown[] | undefined; }> | Readonly<...>>>, ctx: SetupContext<....'.
Types of parameters 'ctx' and 'ctx' are incompatible.
Type 'SetupContext<string[]>' is not assignable to type 'SetupContext<EmitsOptions>'.
Type 'EmitsOptions' is not assignable to type 'string[]'.
Type 'ObjectEmitsOptions' is missing the following properties from type 'string[]': length, pop, push, concat, and 28 more.
if i add props option in loading.vue, error is disappear,or i disable Volar extension, error is disappear too。
something wrong with last overload, so how can i resolve this error?
this is @vue/test-utils mount declare
import { FunctionalComponent, ComponentPublicInstance, ComponentOptionsWithObjectProps, ComponentOptionsWithArrayProps, ComponentOptionsWithoutProps, ExtractPropTypes, VNodeProps, ComponentOptionsMixin, DefineComponent, MethodOptions, AllowedComponentProps, ComponentCustomProps, ExtractDefaultPropTypes, EmitsOptions, ComputedOptions, ComponentPropsOptions } from 'vue';
import { MountingOptions } from './types';
import { VueWrapper } from './vueWrapper';
declare type PublicProps = VNodeProps & AllowedComponentProps & ComponentCustomProps;
export declare function mount<V>(originalComponent: {
new (...args: any[]): V;
registerHooks(keys: string[]): void;
}, options?: MountingOptions<any>): VueWrapper<ComponentPublicInstance<V>>;
export declare function mount<V, P>(originalComponent: {
new (...args: any[]): V;
props(Props: P): any;
registerHooks(keys: string[]): void;
}, options?: MountingOptions<P & PublicProps>): VueWrapper<ComponentPublicInstance<V>>;
export declare function mount<Props, E extends EmitsOptions = {}>(originalComponent: FunctionalComponent<Props, E>, options?: MountingOptions<Props & PublicProps>): VueWrapper<ComponentPublicInstance<Props>>;
export declare function mount<PropsOrPropOptions = {}, RawBindings = {}, D = {}, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = Record<string, any>, EE extends string = string, PP = PublicProps, Props = Readonly<ExtractPropTypes<PropsOrPropOptions>>, Defaults = ExtractDefaultPropTypes<PropsOrPropOptions>>(component: DefineComponent<PropsOrPropOptions, RawBindings, D, C, M, Mixin, Extends, E, EE, PP, Props, Defaults>, options?: MountingOptions<Partial<Defaults> & Omit<Props & PublicProps, keyof Defaults>, D>): VueWrapper<InstanceType<DefineComponent<PropsOrPropOptions, RawBindings, D, C, M, Mixin, Extends, E, EE, PP, Props, Defaults>>>;
export declare function mount<Props = {}, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends Record<string, Function> = {}, E extends EmitsOptions = Record<string, any>, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, EE extends string = string>(componentOptions: ComponentOptionsWithoutProps<Props, RawBindings, D, C, M, E, Mixin, Extends, EE>, options?: MountingOptions<Props & PublicProps, D>): VueWrapper<ComponentPublicInstance<Props, RawBindings, D, C, M, E, VNodeProps & Props>>;
export declare function mount<PropNames extends string, RawBindings, D, C extends ComputedOptions = {}, M extends Record<string, Function> = {}, E extends EmitsOptions = Record<string, any>, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, EE extends string = string, Props extends Readonly<{
[key in PropNames]?: any;
}> = Readonly<{
[key in PropNames]?: any;
}>>(componentOptions: ComponentOptionsWithArrayProps<PropNames, RawBindings, D, C, M, E, Mixin, Extends, EE, Props>, options?: MountingOptions<Props & PublicProps, D>): VueWrapper<ComponentPublicInstance<Props, RawBindings, D, C, M, E>>;
export declare function mount<PropsOptions extends Readonly<ComponentPropsOptions>, RawBindings, D, C extends ComputedOptions = {}, M extends Record<string, Function> = {}, E extends EmitsOptions = Record<string, any>, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, EE extends string = string>(componentOptions: ComponentOptionsWithObjectProps<PropsOptions, RawBindings, D, C, M, E, Mixin, Extends, EE>, options?: MountingOptions<ExtractPropTypes<PropsOptions> & PublicProps, D>): VueWrapper<ComponentPublicInstance<ExtractPropTypes<PropsOptions>, RawBindings, D, C, M, E, VNodeProps & ExtractPropTypes<PropsOptions>>>;
export declare const shallowMount: typeof mount;
export {};
The text was updated successfully, but these errors were encountered:
I have a simple component Loading.vue
And a simple test file, loading.spec.ts
but I have a ts error from volar
if i add props option in loading.vue, error is disappear,or i disable Volar extension, error is disappear too。
something wrong with last overload, so how can i resolve this error?
this is @vue/test-utils mount declare
The text was updated successfully, but these errors were encountered: