Regions in TypeScript [closed]
-
06-07-2021 - |
Frage
In my JavaScript (.js) files, I use a Visual Studio 2012 plugin for regions (here) like this:
//#region "My Region"
//Code here
//#endregion "My Region"
I would also like to have regions in TypeScript (.ts) files as well. Is this a possibility right now?
Lösung
You can download Web Essentials 2012, it lets you use regions in TypeScript.
If you use, Visual Studio 2015, here is the freshest link. Web Essentials 2015.3
Andere Tipps
To request a new feature for TypeScript, you should start a discussion on Codeplex.
There are lots of opinions about regions being a bad thing - perhaps they are telling you that you have too much in a single file. TypeScript has a great way to load modules from many different files and it may be better to use that to separate your concerns.
You can follow the TypeScript GitHub issue here
Still no ETA on when this will be implemented, currently awaiting more feedback.