Skip to content

Instantly share code, notes, and snippets.

@acidjazz
Created July 23, 2021 10:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save acidjazz/620f7520e6970488966adc0dad3397a1 to your computer and use it in GitHub Desktop.
Save acidjazz/620f7520e6970488966adc0dad3397a1 to your computer and use it in GitHub Desktop.
typescript and mixins error
ERROR in client/pages/rst/_rst/menu/create.vue:54:16
TS2769: No overload matches this call.
Overload 1 of 2, '(options?: (object & ComponentOptions<Vue, DataDef<((this: Readonly<unknown> & Vue) => { label: string; state: PushButtonState; rst: Rst | undefined; }) & Omit<Record<string, any>, keyof VueConstructor<...>>, unknown, Vue>, { ...; }, unknown, RecordPropsDefinition<...>, unknown> & ThisType<...> & { ...; }) | undefined): ExtendedVue<...>', gave the following error.
Type '[{ getRst(): Promise<Rst>; crumbs(crumbs: BreadCrumbs): void; } & VueConstructor<Vue>]' is not assignable to type '(VueConstructor<Vue> | ComponentOptions<Vue, DefaultData<Vue>, DefaultMethods<Vue>, DefaultComputed, PropsDefinition<...>, DefaultProps>)[] & [...]'.
Type '[{ getRst(): Promise<Rst>; crumbs(crumbs: BreadCrumbs): void; } & VueConstructor<Vue>]' is not assignable to type '[Record<string, any>, Record<string, any>]'.
Source has 1 element(s) but target requires 2.
Overload 2 of 2, '(options?: (object & ComponentOptions<Vue, DataDef<((this: Readonly<unknown> & Vue) => { label: string; state: PushButtonState; rst: Rst | undefined; }) & Omit<{ getRst(): Promise<Rst>; crumbs(crumbs: BreadCrumbs): void; } & VueConstructor<...>, keyof VueConstructor<...>>, unknown, Vue>, { ...; }, unknown, RecordPropsDefinition<...>, unknown> & ThisType<...> & { ...; }) | undefined): ExtendedVue<...>', gave the following error.
Type '(this: Readonly<unknown> & Vue) => { label: string; state: PushButtonState; rst: Rst | undefined; }' is not assignable to type 'DataDef<((this: Readonly<unknown> & Vue) => { label: string; state: PushButtonState; rst: Rst | undefined; }) & Omit<{ getRst(): Promise<Rst>; crumbs(crumbs: BreadCrumbs): void; } & VueConstructor<...>, keyof VueConstructor<...>>, unknown, Vue> | undefined'.
Type '(this: Readonly<unknown> & Vue) => { label: string; state: PushButtonState; rst: Rst | undefined; }' is not assignable to type '((this: Readonly<unknown> & Vue) => { label: string; state: PushButtonState; rst: Rst | undefined; }) & Omit<{ getRst(): Promise<Rst>; crumbs(crumbs: BreadCrumbs): void; } & VueConstructor<...>, keyof VueConstructor<...>>'.
Type '(this: Readonly<unknown> & Vue) => { label: string; state: PushButtonState; rst: Rst | undefined; }' is missing the following properties from type 'Omit<{ getRst(): Promise<Rst>; crumbs(crumbs: BreadCrumbs): void; } & VueConstructor<Vue>, keyof VueConstructor<Vue>>': getRst, crumbs
52 | const defineComponent: DefineComponentWithMixin = (opts: any) => opts
53 |
> 54 | export default defineComponent({
| ^^^^^^^^^^^^^^^^^
> 55 | mixins: [rstMixin],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment