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

117
Vistas
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
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