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

203
Vistas
Handling "export X from 'Y'" when generating d.ts files

I am using TypeScript to generate d.ts files from our existing JavaScript codebase which is annotated using JSDoc, as per https://www.typescriptlang.org/docs/handbook/declaration-files/dts-from-js.html.

My problem is that the TS compiler (understandably) cannot handle some non-TS syntax which otherwise is parseable using Babel, specifically export x from 'y', e.g.

export { something } from './somewhere';

This yields the following when emitting types:

app/utils/index.js:76:1 - error TS1128: Declaration or statement expected.

76 export { something } from './somewhere';

I have tried adding the ts-ignore annotation, but it does not seem to work (I am using TS 4.5). I get the same error as above.

// @ts-ignore
export { something } from './somewhere';

Apart from removing this syntax (which is not feasible since we use it a lot), what would be the preferred way of solving this?

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