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

243
Vistas
JSDoc - Is reusing type definitions from other modules an anti-pattern?

Imagine this project structure:

api/
  activity/
    index.js
    activity.d.js <-- JSDOC Type Definitions

contexts/
  activity/
    ActivityContext.jsx 
    ActivityContext.d.js <-- JSDOC Type Definitions

In api/activity/activity.d.js I have the type definition "A" and I wanna reuse it in context/activity/ActivityContext.jsx.

There are two options:

  1. Copying and pasting the specific type definition of api/activity/activity.d.js inside contexts/activity/ActivityContext.d.js.

  2. Or (the one I prefer) importing api/activity/activity.d.js inside contexts/activity/ActivityContext.jsx.

Is it considered an anti-pattern to reuse types from other modules in JSDOC?

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