Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Comercial
    • Calculadora

0

403
Vistas
Vue 'watch' problem: Declaration emit for this file requires using private name 'handler'. An explicit type annotation may unblock declaration emit

I use 'watch' in the component, just like:

watch: {
        config:{
            handler: function(){
                this.colorAnalysis = this.$props.config;
            },
            deep: true,
            immediate: true
        },

It can work, but show message below:

Declaration emit for this file requires using private name 'handler'. An explicit type annotation may unblock declaration emit.

I can not figure out what's the problem, and how to prevent this situation. Please give me some directions.Thanks.

7 months ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I do not figure out the reason. But when I change format to:

watch: {
    config() {
        this.colorAnalysis = this.$props.config;
    },
}

the message disappeared!

7 months ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos