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

ES6 validator doesn't understand static class methods #629

Closed
AshleyScirra opened this issue Nov 25, 2015 · 5 comments
Closed

ES6 validator doesn't understand static class methods #629

AshleyScirra opened this issue Nov 25, 2015 · 5 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug javascript JavaScript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Milestone

Comments

@AshleyScirra
Copy link

The following code is valid ES6 code:

(function ()
{
    class C {
        static Foo()
        {
            console.log("Foo");
        }
    };
})();

(jsconfig.json must specify the "ES6" target to understand the class syntax)

VS code underlines "static" in red and says "Modifiers cannot appear here". This is an incorrect error: it is valid ES6 syntax.

Note VS Code does not mark it as an error if the class is not wrapped in an IIFE, but these are typically used for encapsulation.

@jrieken jrieken added bug Issue identified by VS Code Team member as probable bug javascript JavaScript support issues labels Nov 26, 2015
@jrieken jrieken added the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label Dec 10, 2015
@jrieken
Copy link
Member

jrieken commented Dec 10, 2015

This comes from the version of TypeScript we are using behind the scenes. Will be fixed once we use project salsa.

@egamma egamma modified the milestone: Backlog Dec 10, 2015
@castlerek
Copy link

+1 the same

@ronnieoverby
Copy link

+1. I guess this is Salsa? microsoft/TypeScript#4789

@jrieken
Copy link
Member

jrieken commented Jan 19, 2016

Yes - that Salsa it is. We plan to ship the Jan release with a sneak peak of it and make it GA for Feb

@jrieken
Copy link
Member

jrieken commented Mar 16, 2016

As we now ship with project Salsa this should work.

@jrieken jrieken closed this as completed Mar 16, 2016
@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
bug Issue identified by VS Code Team member as probable bug javascript JavaScript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

6 participants
@ronnieoverby @egamma @AshleyScirra @jrieken @castlerek and others