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'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:
I have been experimenting a bit and dropping a jsconfig.json in my project seems to do the trick and no longer shows these errors. Is that the way to achieve this?
I jumped too early. A jsconfig.json fixes the first error with the import but not the second one with the export.
@tmkbry I have a similar config as yours, plus the "module": "commonjs" inside compilerOptions, but I can't get rid of the squigglies on the export either way.
EDIT: I think ideally the module should be es6 but jsconfig.json reports an error for that, which otherwise is acceptable inside a tsconfig.json.
import{connect}from'react-redux';constmapStateToProps=(state)=>{ ... };classAppextendsReact.Component{ ... }exportdefaultconnect(mapStateToProps)(App);// here be the relentless squiggly
The export throws the same error as before: 'export=' can only be used in a .ts file.
Erich Gamma (@egamma) Sorry you needed to do this spring cleaning, I'll try discerning between issues that belong to TypeScript. I hope this is all automated for you to copy over to the right repo :)
You and your team are doing an amazing job with Code 👍
Activity
[-]Salsa with JSX without TypeScript[/-][+]Salsa in JS with JSX without TypeScript[/+]prashaantt commentedon Feb 9, 2016
I have been experimenting a bit and dropping ajsconfig.jsonin my project seems to do the trick and no longer shows these errors. Is that the way to achieve this?I jumped too early. A
jsconfig.jsonfixes the first error with the import but not the second one with the export.prashaantt commentedon Feb 9, 2016
@tmkbry I have a similar config as yours, plus the
"module": "commonjs"insidecompilerOptions, but I can't get rid of the squigglies on the export either way.EDIT: I think ideally the module should be
es6butjsconfig.jsonreports an error for that, which otherwise is acceptable inside atsconfig.json.prashaantt commentedon Feb 9, 2016
Ok, so this works:
but this doesn't:
Awesome!
prashaantt commentedon Feb 9, 2016
(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.)
prashaantt commentedon Feb 9, 2016
Another instance that I can't work around:
The
exportthrows the same error as before:'export=' can only be used in a .ts file.[-]Salsa in JS with JSX without TypeScript[/-][+]ES6 modules broken in 0.10.8 with Salsa[/+]egamma commentedon Feb 10, 2016
Extracted a separate issue for
Moving to Salsa
egamma commentedon Feb 10, 2016
This issue was moved to microsoft/TypeScript#7006
prashaantt commentedon Feb 10, 2016
Erich Gamma (@egamma) Sorry you needed to do this spring cleaning, I'll try discerning between issues that belong to TypeScript. I hope this is all automated for you to copy over to the right repo :)
You and your team are doing an amazing job with Code 👍
egamma commentedon Feb 10, 2016
Prashant Tiwari (@prashaantt) no need to sorry. We need this feedback and the issue mover (https://github-issue-mover.appspot.com/) helps a lot. Also glad you like Code.