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

115
Views
Looking for a way mix a standard typesscript js project with a project using modules

I have been looking for a way to have a common set of typescript files used in two projects. I am looking at having some basic interfaces and classes defined. One of the projects is node.js so using exports and modules is no problem.

The other is for a cloud based game backend that does not support modules.

I would like to able to use the same typescript interfaces in both projects. Preferably without duplicating files.

I have tried a few things and searched but no luck. I was hoping there was a to disable modules through typescript. I could not find anything that this would be possible due to way modules can be structured. I know my project is simple enough. And I could get by with just having interfaces if classes were issues.

I tried to put the base interfaces in a file. Then have a second one that exported them and had a <//reference> to the base definitions but this didn't seem to work. Gives errors about exports and local files. This fixed the one project because I could just use all /// but broke the node.js

If there was a directive like a C include I think it could be made to work.

about 4 years ago · Juan Pablo Isaza
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!