Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

148
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!