ts error

941 阅读1分钟

ERROR in src/views/redirect/Index.vue:10:3 TS2769: No overload matches this call. The last overload gave the following error. Argument of type '{ created(): void; render(): void; }' is not assignable to parameter of type 'ComponentOptionsWithObjectProps<readonly string[] | Readonly<ComponentObjectPropsOptions<Record<string, unknown>>>, unknown, unknown, {}, {}, ComponentOptionsMixin, ... 4 more ..., any>'. Object literal may only specify known properties, and 'created' does not exist in type 'ComponentOptionsWithObjectProps<readonly string[] | Readonly<ComponentObjectPropsOptions<Record<string, unknown>>>, unknown, unknown, {}, {}, ComponentOptionsMixin, ... 4 more ..., any>'. 8 | 9 | export default defineComponent({

10 | created() { | ^^^^^^^ 11 | const { params, query } = useRoute() 12 | const { path } = params 13 | useRouter()

ERROR : Module '"../../../../node_modules/vue/dist/vue"' has no exported member 'reactive'. Did you mean 'Directive'?

blog.csdn.net/weixin_4030…

typescript @4.0.5 也不行 typescript @4.3.5 ok

webpack style-resources-loader

pluginOptions: {
   'style-resources-loader': {
     preProcessor: 'scss',
     patterns: [
       path.resolve(__dirname, 'src/styles/_variables.scss'),
       path.resolve(__dirname, 'src/styles/_mixins.scss')
     ]
   }
 }

"@vue/cli-plugin-babel": "~4.5.0",

?? a?.b