Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

150
Vistas
How to create .ts components in Vue?

I have an old project I need to update that uses 'av-ts' plugin to create class style components with vue-ts-loader to compile .ts files as vue components. The project currently runs on vue 2.4.2 but I want to update to 2.6.14. Since 'vue-ts-loader' is depricated and the project breaks after updating to ^2.5 I need an alternative way to compile the files.

I wonder if there is a way to configure the regular ts-loader to do that for me. Anyone have an idea?

Components currently look like this:

import { Component, p, Prop } from 'av-ts';
import * as Vue from 'vue';

@Component({
  template: require('./example-component.component.html')
})
export default class ExampleComponent extends Vue {
  @Prop public icon: any = p({
    type: String,
    required: false,
    default: ''
  });

  @Prop public width: any = p({
    type: Number,
    required: false,
    default: 24
  });

  @Prop public height: any = p({
    type: Number,
    required: false,
    default: 24
  });

  @Prop public classes: any = p({
    type: String,
    required: false,
    default: ''
  });
}


about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

In the worst case. We could not use SFC with ts. Due to vue-class-component is deprecated in vue3.There is a alternative one in vue3.vue-facing-decorator.It shows how to write component with regular ts file.

about 4 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 Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda