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

Destructured imports can cause compilation failures in .d.ts files #1

Open
sjbarag opened this issue Jan 9, 2019 · 0 comments
Open
Labels
bug Something isn't working

Comments

@sjbarag
Copy link
Contributor

sjbarag commented Jan 9, 2019

Splitshot does not handle destructured imports very well right now. It works alright if you've only got one of them, but it names the imported item "". This creates an issue once you have two imports like this in one file, as Splitshot names both of them "".

{ join } = require("path");
{ readFile } = require("fs");

Error message: error TS2300: Duplicate identifier '_'.

Note that the error message doesn't occur until compiling a project with Splitshot's output, as the TypeScript compiler itself complains about the duplicate _ consts that get declared.

@sjbarag sjbarag added the bug Something isn't working label Jan 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant