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

202
Vistas
Merge two typedef files jsdoc

I have two separate typedef files.

typedefFirst.js

/**
 * ControllerResponse
 * @typedef {Object} ControllerResponse
 * @property {Number} statusCode
 * @property {{ data: (Object | Array )}} body
 */

/**
 * ExpressRouter
 * @typedef {import('express').Router} ExpressRouter
 */

typedefSecond.js

/**
 * Context
 * @typedef {Object} Context
 * @property {String} userId
 * @property {String} role
 * @property {String} accessToken
 */

/**
 * ExpressRequest
 * @typedef {import('express').Request} ExpressRequest
 */

I want to aggregate all types and define all the types in one file i.e. typedefFirst.js.

I tried export.unused = {} in typedefSecond.js and tried below in typedefFirst.js,

/**
 * @typedef {import('./typedefSecond.js')}
 */

But it is not working.

How can I merge both typedef files?

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