Related error spans for multiple default exports · Issue #25032 · microsoft/TypeScript (original) (raw)

Now that we support multiple related spans for errors (#10489, #22789, #24548), we'd like to improve an existing error message.

Currently, we provide an error on each declaration when a module has multiple export defaults.

A module cannot have multiple default exports

We can instead add a related span on all declarations but the first.

This export conflicts with the first. 

This can help users quickly glance at the original declaration.