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

172
Vistas
Can I use TS classes/interfaces in a simple JS mean application?

Let's say that I have a build up MEAN application written in JS, and I want to keep it but add some classes/interfaces using TS (I want to do this because I want interfaces) and use it in my controllers to communicate with my backend. Is it possible? If yes, how do i do it?

Thanks in advance!

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

0

Since TypeScript is a superset of javascript all JS code will work in typescript BUT you need to change the file extensions from .js to .ts

Furthermore, all typescript code must be compiled back to javascript before run. which means a typescript compiler has to be installed and configured.

That was my answer to your question.

As a piece of advice since you are building with MEAN stack then you are used to Angular way of structuring code.

If that is the case then you can build your server the same way with TypeScript using a framework called NestJS which is very very similar to Angular:

https://nestjs.com

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