• Empleos
  • Sobre nosotros
  • profesionales
    • Inicio
    • Empleos
    • Cursos y retos
  • empresas
    • Inicio
    • Publicar vacante
    • Nuestro proceso
    • Precios
    • Evaluaciones
    • Nómina
    • Blog
    • Comercial
    • Calculadora de salario

0

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

about 3 years 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!

about 3 years 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 vacante Precios Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recomiéndame algunas ofertas
Necesito ayuda