Open Soabbar opened 3 years ago
@husayt do you mind looking at this since you closed #58 ?
So it seems #58 is not resolved then, I will reopen it. Same time I can't reproduce this. @Soabbar can you please provide a codesandbox with showing this error?
i need help with this
nothing seems to be working, i already have middleware added in d.ts file for component options
also like this `
<script lang="ts">
import { Component, mixins } from 'nuxt-property-decorator';
import Login from '~/components/Login.vue';
import Web3Mixin from '~/mixins/web3';
@Component({
components: {
Login
}
})
export default class AuthPage extends mixins(Web3Mixin) {
middleware() {
return 'authenticated';
}
layout() {
return 'auth';
}
}
</script>
`
layout works fine but middleware doesnt, can you guys please add middleware as default hooks as it is among nuxt hooks
Same as this issue https://github.com/nuxt-community/nuxt-property-decorator/issues/58 Nuxt hooks aren't matched.
No overload matches this call. Overload 1 of 2, '(options: ComponentOptions<Vue, DefaultData<Vue>, DefaultMethods<Vue>, DefaultComputed, PropsDefinition<Record<string, any>>, Record<...>> & ThisType<...>): <VC extends VueClass<...>>(target: VC) => VC', gave the following error. Argument of type '{ components: { AboutUsPage: typeof AboutUsPage; HomePage: typeof HomePage; LandingPage: typeof LandingPage; }; middleware: string; asyncData(): Promise<{ landingTextHead: any; homepageTextHead: any; }>; }' is not assignable to parameter of type 'ComponentOptions<Vue, DefaultData<Vue>, DefaultMethods<Vue>, DefaultComputed, PropsDefinition<Record<string, any>>, Record<...>> & ThisType<...>'. Object literal may only specify known properties, and 'middleware' does not exist in type 'ComponentOptions<Vue, DefaultData<Vue>, DefaultMethods<Vue>, DefaultComputed, PropsDefinition<Record<string, any>>, Record<...>> & ThisType<...>'. Overload 2 of 2, '(target: VueClass<Vue>): VueClass<Vue>', gave the following error. Argument of type '{ components: { AboutUsPage: typeof AboutUsPage; HomePage: typeof HomePage; LandingPage: typeof LandingPage; }; middleware: string; asyncData(): Promise<{ landingTextHead: any; homepageTextHead: any; }>; }' 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'?