Can create Javascript classes in an object oriented way
It would be very helpfull if Visual Studio supported creating Javascript classes. Just like adding an regular C# or VB.NET class it would be very nice if you could add a Javascript function with a basic class-structure in such a way that automatic namespacing is supported and automatic compression into a single JS file is supported. Of course, IntelliSense should be able to fully comprehend these created classes!
Thanks for your feedback, Alex! With the vast number of libraries and patterns for creating class-like functions in JavaScript, we aren’t able to create a simple template that would fit a majority of users.
Separately, you may find that the TypeScript project (as mentioned by one commenter) achieves what you want. Please visit http://www.typescriptlang.org for more details.
Thank you!
Jordan – Microsoft Visual Studio PM
2 comments
-
Igor Zhan
commented
Problem with this suggestion is changes the fundamentals of JavaScript. I for one don't care or need any of the aforementioned for JS. Reading your comment, however, reminded of TypeScript (another MS project). It "compiles" (more like transforms) into JS but supports namespaces, classes, and other constructs as 1st class concepts.
-
Neetish Neerala
commented
no