<template>
<div>
home
</div>
</template>
<script lang="ts">
import { Component, Vue } from 'nuxt-property-decorator'
@Component({
middleware: ['auth']
})
export default class HomePage extends Vue {}
</script>
<style lang="scss" scoped></style>
the middleware hook is doing as expected but my ide throws the error...
No overload matches this call.
Overload 1 of 2, '(options: ComponentOptions<Vue, DefaultData, DefaultMethods, DefaultComputed, PropsDefinition<Record<string, any>>, Record<string, any>> & ThisType): <VC extends VueClass<...>>(target: VC) => VC', gave the following error.
Argument of type '{ middleware: string[]; }' is not assignable to parameter of type 'ComponentOptions<Vue, DefaultData, DefaultMethods, DefaultComputed, PropsDefinition<Record<string, any>>, Record<string, any>> & ThisType'.
Object literal may only specify known properties, and 'middleware' does not exist in type 'ComponentOptions<Vue, DefaultData, DefaultMethods, DefaultComputed, PropsDefinition<Record<string, any>>, Record<string, any>> & ThisType'.
Overload 2 of 2, '(target: VueClass): VueClass', gave the following error.
Argument of type '{ middleware: string[]; }' is not assignable to parameter of type 'VueClass'.
Object literal may only specify known properties, and 'middleware' does not exist in type 'VueClass'.
I cant see anywhere in the docs that covers adding specific types for the decorator.
Is there a extra step in setting this up that I am missing?
I have the following component...
the middleware hook is doing as expected but my ide throws the error...
I cant see anywhere in the docs that covers adding specific types for the decorator.
Is there a extra step in setting this up that I am missing?