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
app/src/components/other/AppSidebar.vue:43:2 - error TS2769: No overload matches this call.
Overload 1 of 2, '(options: ComponentOptions<Vue, DefaultData<Vue>, DefaultMethods<Vue>, DefaultComputed, PropsDefinition<DefaultProps>, DefaultProps> & ThisType<...>): <VC extends VueClass<...>>(target: VC) => VC', gave the following error.
Type 'DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, EmitsOptions, string, PublicProps, Readonly<...> & ({ ...; } | { ...; }), {}>' is not assignable to type 'Component<any, any, any, any> | AsyncComponent<any, any, any, any>'.
Type 'ComponentPublicInstanceConstructor<{ $: ComponentInternalInstance; $data: {}; $props: Partial<{}> & Omit<({} & (Readonly<{} & {} & {}> & ({ [x: string & `on${string}`]: never; } | { ...; }))) & (VNodeProps & ... 3 more ... & ({ ...; } | { ...; })), never>; ... 10 more ...; $watch(source: string | Function, cb: Funct...' is missing the following properties from type 'VueConstructor<Vue>': extend, nextTick, set, delete, and 10 more.
Overload 2 of 2, '(target: VueClass<Vue>): VueClass<Vue>', gave the following error.
Argument of type '{ components: { AppLogo: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, EmitsOptions, string, PublicProps, Readonly<...> & ({ ...; } | { ...; }), {}>; }; }' is not assignable to parameter of type 'VueClass<Vue>'.
Object literal may only specify known properties, but 'components' does not exist in type 'VueClass<Vue>'. Did you mean to write 'component'?
43 @Component({
~~~~~~~~~~~
44 components: {AppLogo},
~~~~~~~~~~~~~~~~~~~~~~~~~~
45 })
~~
Simply adding in <script></script> resolves the issue. So this obviously isn't a big deal, but just thought I'd mention, especially as it took me a very long time to debug :)
The text was updated successfully, but these errors were encountered:
The
<script>
section of vue templates is optional and apps build fine without it, butvue-tsc
causes a type error to be thrown:Example component:
(noting there's no
<script>
section)Simply adding in
<script></script>
resolves the issue. So this obviously isn't a big deal, but just thought I'd mention, especially as it took me a very long time to debug :)The text was updated successfully, but these errors were encountered: