Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

158
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!