I would like to know if any of you guys know a way to enable the following feature on Visual Studio (either a hidden setting or an extension):
I'm used to javascript development on Visual Studio where if I type: "if" on the text editor, it shows me a popup ("code snippet for an if statement"). Pressing ENTER the following is added:
if (true) {
}
This is not available for typescript files!
These snippets are really useful and this is just a simple example
Another basic feature I'm missing is "braces auto completion".
I am not sure if there is a way to enable it or not, but really would like these basic features available.
This also applies for the newly released Visual Studio 2015. On the other hand, Visual Studio Code seems to handle it very well.
On the menu bar, choose Edit > IntelliSense > Insert Snippet. From the right-click or context menu in the code editor, choose Snippet > Insert Snippet.
For projects developed in Visual Studio 2022, we encourage you to use the TypeScript NuGet or the TypeScript npm package for greater portability across different platforms and environments. For more information, see Compile TypeScript code using NuGet and Compile TypeScript code using tsc.
There is an issue on Github about being able to use Javascript snippets in Typescript files, and to make the Snippet Code Manager being able to recognize Typescript as a Language. https://github.com/Microsoft/TypeScript/issues/312
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With