-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
ES6 modules broken in 0.10.8 with Salsa #7006
Comments
From @prashaantt on February 9, 2016 16:1
I jumped too early. A |
From @tmkbry on February 9, 2016 16:20 @prashaantt I had the same problem, the jsconfig.json fixed it for me, thanks. To the second problem, It doesn't show an error for me, maybe it's because I have this in my jsconfig.json: |
From @prashaantt on February 9, 2016 16:29 @tmkbry I have a similar config as yours, plus the EDIT: I think ideally the module should be |
From @prashaantt on February 9, 2016 18:35 Ok, so this works: export default function () { } but this doesn't: export default () => { } Awesome! |
From @prashaantt on February 9, 2016 18:37 (Perhaps I should leave this issue open, just in case there's anything the Code team can do to make this alt syntax work too.) |
From @prashaantt on February 9, 2016 19:26 Another instance that I can't work around: import { connect } from 'react-redux';
const mapStateToProps = (state) => { ... };
class App extends React.Component { ... }
export default connect(mapStateToProps)(App); // here be the relentless squiggly The |
Extracted a separate issue for
Moving to Salsa |
There seems to be a few issues above. What is the specific problem here? Is it that ES6 should be the default module type? (which would be incompatible with the other request for CommonJS to be the default modules type)? Or is that |
It's more like Here are a few things that don't work: const a = function () {}; // this could be whatever: object or function, arrow or not, anonymous or named
export default a; export default () => { } function myFunc() {};
export default myFunc(); These do work: export const a = function () {}; // could be anything export default function myFunc() {}; // anonymous is also ok const a = function () {};
export { a }; const a = function () {};
module.exports = a; |
I just tried all the things above which state they don't work, using the latest Thanks! |
@billti Thanks for looking into this. As recommended in the release notes for VS Code, my error report was based on Per your request, I tried moving to the latest 1.8 release version on npm But since you specifically asked me to check on 1.8 I'm wondering if its latest version is up on npm at all, because the currently |
@prashaantt typescript@next is whatever is currently in the
|
Awesome, thanks! |
From @prashaantt on February 9, 2016 15:34
I'm loving the JSX support in the latest Code update, courtesy Salsa — thanks a ton for that! The thing is, I'm not ready to go all out on TS yet. Is it possible to just get the JSX auto-complete/IntelliSense support without running into issues like these:
Copied from original issue: microsoft/vscode#2848
The text was updated successfully, but these errors were encountered: