You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this is working as intended. Import/export aliases can't merge with local declarations in TypeScript. What's more, export type doesn't strictly import the type side of things, it only restricts the things you can do with that import to type-like positions, so even if we wanted to ease the restriction just for export type, we still couldn't.
Bug Report
TypeScript usually allows exporting values and types with the same name.
But it doesn't work when re-exporting a type from a third-party library and exporting an arbitrary value at the same time.
🔎 Search Terms
export type re-export error
🕗 Version & Regression Information
⏯ Playground Link
https://codesandbox.io/s/misty-field-16f9f?file=/src/index.ts
💻 Code
🙁 Actual behavior
Error:
🙂 Expected behavior
I would expect this to work since the re-exported name is purely a type.
The text was updated successfully, but these errors were encountered: