question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

exporting a type outside of its declaration incorrectly outputs an export

See original GitHub issue

Using sucrase 3.9.3, this valid TypeScript

interface Test {

}

type Test2 = number;

export { Test, Test2 };

export default Test;

outputs js that exports objects Test and Test2, which don’t exist.

https://sucrase.io/#code=interface Test { } type Test2 %3D number%3B export { Test%2C Test2 } export default Test%3B

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
alangpiercecommented, Mar 11, 2019

I just released a fix for this in 3.10.0.

1reaction
kiliancscommented, Jan 9, 2019

I’ve got a local branch that fixes this. Tests pass except for extra line break, which I’ll figure out. Hopefully it’s not too terrible. Will make a PR later today or in the morning.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Export a type after its declaration on Typescript 3.8+
I managed to solve my problem: When the --isolatedModuls flag is on, VS Code's TypeScript language service can't tell if the type we're ......
Read more >
Export data to a text file - Microsoft Support
This topic explains how to export text files by using the Export Wizard in Microsoft Access. What do you want to do? Understand...
Read more >
Documentation - Modules - TypeScript
Exporting a declaration. Any declaration (such as a variable, function, class, type alias, or interface) can be exported by adding the export keyword....
Read more >
rollup.js
Rollup allows you to write your code using the new module system, and will then compile it back down to ... Export a...
Read more >
Common Export Documents - International Trade Administration
When it comes to selling and shipping your products outside of the United ... price, weight, kind and other specifications) and is a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found