Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Only named exports may use 'export type'. #33

Closed
lucb31 opened this issue Jan 16, 2024 · 3 comments · Fixed by #34
Closed

Error: Only named exports may use 'export type'. #33

lucb31 opened this issue Jan 16, 2024 · 3 comments · Fixed by #34

Comments

@lucb31
Copy link

lucb31 commented Jan 16, 2024

Hi,

I just upgraded to the newest version 0.3.21 and got the following error when trying to build my project:

> tsc -p tsconfig.package.json

../../node_modules/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts:4:1 - error TS1383: Only named exports may use 'export type'.

4 export type * from './types';
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Found 1 error in ../../node_modules/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts:4

I think it´s related to this commit d04e7fe

After downgrading back to 0.3.20 the error is gone. Any ideas?

@jridgewell
Copy link
Owner

You're probably using an older TS version? I think TS v5 added export type * syntax.

@karthik-sciera
Copy link

As @lucb31 comments, the error is gone when downgrading to 0.3.20.

@lucb31
Copy link
Author

lucb31 commented Jan 20, 2024

@jridgewell thanks for the fix. Works again with the most recent version. Makes sense to not rely on TS 5 syntax here IMO since quite a few other packages depend on this and none explicitly state that they require TS v5.
Appreciate your effort!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants