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

296
Vistas
Proper structure for NPM package containing only typescript models?

I am trying to create a shared project / NPM package that will contain shared typescript models across a couple different projects. I managed to get the package published to GitHub and am able to install it. I can't seem to figure out the correct folder structure and .tsconfig values.

I want to be able to import my models based on the folder they reside in. For example: import { User } from @org/project-name/users

My current folder structure looks like this. enter image description here

Where each model contains something like this export type Organization = {...}

And the index.ts file in each folder aggregates the individual model exports. Like export { Organization } from './organization';

My .tsconfig has the following options set:tsconfig

How can I build the typescript project and publish the npm package in such a way that I can import the correct model based on it's parent folder like mentioned above?

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