In this case you should follow compiler instructions and do not import defineProps. But to make eslint happy you would need to add defineProps in globals. Use this link for more information eslint.vuejs.org/user-guide/#compi...
Also probably you will encounter 'props' is assigned a value but never used @typescript-eslint/no-unused-vars. This could be fixed with eslint.vuejs.org/rules/script-setu...
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Ey! Great serie!
How have you resolve this console warning (on
npm run dev
)?[@vue/compiler-sfc]
definePropsis a compiler macro and no longer needs to be imported.
But if I don't import
defineProps
inHelloWorld.vue
file, the next line is underline in red:defineProps<{ msg: string }>()
With this message:
'defineProps' is not defined.eslint(no-undef)
Thanks!
Hi, thanks!
In this case you should follow compiler instructions and do not import
defineProps
. But to makeeslint
happy you would need to adddefineProps
inglobals
. Use this link for more information eslint.vuejs.org/user-guide/#compi...Also probably you will encounter
'props' is assigned a value but never used @typescript-eslint/no-unused-vars
. This could be fixed with eslint.vuejs.org/rules/script-setu...