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

0

415
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.

9 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!

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

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar empleo Precios Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2023 PeakU Inc. All Rights Reserved.