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

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

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