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

159
Vistas
Typescript isolatedModules `export type { T } from './file'` vs `export { type T } from './file'` syntax

When I copied some code from one of my create-react-app projects to another. I've got these kind of errors:

SyntaxError: .../index.ts: Unexpected token, expected "," (3:47)

> 3 | export { default, type TimeInputProps } from "./TimeInput";
    |                        ^

The error is gone after changing the line to:

export { default } from "./TimeInput";
export type { TimeInputProps } from "./TimeInput";

One project works with both syntaxes but the other one only accepts the second syntax. Typescript version is 4.7.4 in both. What is the reason for it? Is there any difference? Couldn't find any documentation on it.

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