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

Better Support for ESNext #4078

Closed
EisenbergEffect opened this issue Mar 13, 2016 · 8 comments
Closed

Better Support for ESNext #4078

EisenbergEffect opened this issue Mar 13, 2016 · 8 comments
Assignees

Comments

@EisenbergEffect
Copy link

At present, using ESNext features such as decorators, async/await, class instance fields, etc. results in the editor drawing red squiggles. In the very least, it would be nice if there was an easy way to stop VSCode from complaining about these features in a normal .js file.

Perhaps some thought needs to go into how VSCode will handle the evolution of ES in general. With developers using tools like Babel, and opting into stage-n features before they are finalized as a norm, I think this is going to crop up more and more. Not to mention that popular frameworks like Aurelia, React, Ember and Angular 2 are using these features more.

As for me, I have a hard time recommending VSCode to anyone that isn't doing TypeScript or sticking strictly to ES2015. It gets ugly pretty quick otherwise. I'm looking forward to seeing this improve. It's the only thing really holding me back. Thanks for all the great work so far!

@egamma
Copy link
Member

egamma commented Mar 14, 2016

@EisenbergEffect thanks for the feedback.

At present, using ESNext features such as decorators

Actually decorators are supported and you can enable them in the jsconfig.json pls see microsoft/TypeScript#6872 (comment)

async/await, class instance fields, etc. results in the editor drawing red squiggles.

We will add support for disabling the built-in diagnostics, pls see the discussion in #3804 and I'm closing this issue in favor of this one.

@egamma
Copy link
Member

egamma commented Mar 14, 2016

closing as a duplicate of #3804

@egamma egamma closed this as completed Mar 14, 2016
@EisenbergEffect
Copy link
Author

@egamma Nice to see you here :)
Thanks for looking into these features. Regarding decorators, it's actually broken on my VSCode instance with the latest release.

@egamma
Copy link
Member

egamma commented Mar 15, 2016

@EisenbergEffect this works for me. Tested in 0.10.11:

Error without the experimentalDecorators property:

image

No error when experimentalDecorators is true:

image

@EisenbergEffect
Copy link
Author

Check this out:

screen shot 2016-03-15 at 8 07 50 am

One thing that is different from your example above is my folder structure. I have something like this:

screen shot 2016-03-15 at 8 15 16 am

@egamma
Copy link
Member

egamma commented Mar 15, 2016

I also see that you have both a jsconfig.json and a tsconfig.json. Is it a mixed .js and .ts project? If yes then you can set allowJS to true in the tsconfig.json and then you can delete the jsconfig.json. If it is a .js project only then I would delete the tsconfig.json.

@EisenbergEffect
Copy link
Author

If I remove the tsconfig, the problem goes away :)

It's not a mixed project per se. I was working on a sample app for an Aurelia workshop I'm going to be running. I included the tsconfig because I suspect some students will want to use TS instead of Babel. So, it was there out of a convenience for them. However, I should probably provide them with a complete TS setup separate from this one. Having both clearly causes the issue and probably doesn't make sense.

Thanks!

@egamma
Copy link
Member

egamma commented Mar 16, 2016

👍 on separate .ts and .js setup.

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants