Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

116
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda