Visual Studio 2019 + ReSharper intellisense not recognising null coalescing operator (??) in javascript - resharper

Using Visual Studio 2019 with ReSharper (both on the latest version) I an unable to get intellisense to stop complaining about ECMAScript 2020 features like the null-coalescing operator (??).
The code works but it's annoying that the editor thinks it's an error. This is what I see:
I've tried setting the project's TypeScript Build ECMAScript Version to ECMAScript 2020 in VS: the ReSharper ECMAScript version is set to "Experimental". Has anyone managed to get this working?

Related

ReSharper intellisense for netcoreapp2.0 console app referencing netstandard2.0 lib

I installed visual studio 15.3 and the .net core 2.0 sdk today. I created a console application(netcoreapp2.0) with a project reference to a library(netstandard2.0). With ReSharper enabled I'm not getting any intellisense for types in the library. Lot's of errors in VS but the project builds/runs if done from the command line(dotnet build). If I suspend ReSharper, intellisense starts working. With ReSharper enabled, if I set the library to netstandard1.x intellisense works.
Is there a workaround for this?
ReSharper 2017.1 doesn't support the final versions of .net core 2 or .net standard 2 - it was released before they were. There is better support in the current (as of 16/08/2017) EAP builds of 2017.2, but there are still some issues. We'll be improving the support for the rest of the Early Access Program, and be ready for the release of ReSharper 2017.2, which should be very soon.
For now, if you can, change your library project from netstandard2.0 to netcoreapp2.0.
<TargetFramework>netcoreapp2.0</TargetFramework>
It will work just fine :)

How do you choose the version of typescript for your node visual studio project

I have a node console application in VS2015 Update 2. Some Typescript features are missing and I'd like to tell my project to use TS1.8. Where do I do that? I am also using Resharper.
Where do I do that? I am also using Resharper.
TypeScript ships with nightlies : http://blogs.msdn.com/b/typescript/archive/2015/07/27/introducing-typescript-nightlies.aspx
More:
Documentation on how to use it with visual studio https://github.com/Microsoft/TypeScript/wiki/Dev-Mode-in-Visual-Studio
From that link :

Compiling with Visual Studio 2012 tools through Visual Studio 2015

I have a lot of developers currently using Visual Studio 2012 and I would like to upgrade them to 2015 in two stages. First upgrade to Visual Studio 2015, then upgrade to the new MSBuild (compiler) toolset. This is important because I would like builds in Visual Studio to use the same toolset as builds in our build scripts, which are available on developer machines and used by the build servers. I would like to avoid picking a day and telling every developer to install Visual Studio 2015, and simultaneously pushing changesets to our repositories/branches to update the build scripts all at once.
From my understanding, the ToolsVersion attribute of the Project element in the project file drives the distinction between MSBuild versions. However, when building a project with ToolsVersion=4.0 in Visual Studio 2015, I receive the following messages:
Building with tools version "14.0".
Project file contains
ToolsVersion="4.0". This toolset may be unknown or missing, in which
case you may be able to resolve this by installing the appropriate
version of MSBuild, or the build may have been forced to a particular
ToolsVersion for policy reasons. Treating the project as if it had
ToolsVersion="14.0". For more information, please see
http://go.microsoft.com/fwlink/?LinkId=293424.
In addition to that, I can follow the build output and see that it is in fact using the Visual Studio 2015 toolset to compile the code. I know the "4.0" toolset is not missing (I have Visual Studio 2012 installed, along with the .NET Framework versions that include that version of MSBuild), so I'm assuming either Visual Studio 2015 can't find it, or there is a "policy reason" I don't understand.
According to the MSDN page for Standard and Custom Toolset Configurations, MSBuild 12.0 (Visual Studio 2013) includes the 4.0 toolset. However I can't find any information on MSBuild 14.0 (Visual Studio 2015).
Is it possible to build in Visual Studio 2015, but use the Visual Studio 2012 toolset? If so, how? And what are the "policy reasons" mentioned in the build warning?
Solution
Have your developers set the environment variable MSBUILDDEFAULTTOOLSVERSION to 4.0. One simple way to do this is to have them run open an elevated PowerShell prompt and run:
[Environment]::SetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION", "4.0", "Machine")
Visual Studio will need to be reopened before it will pick up this change. Once you are ready to upgrade to the new MSBuild toolset, have your developers remove that environment variable:
[Environment]::SetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION", "4.0", "Machine")
Background
From MSDN (emphasis mine):
Starting in Visual Studio 2013, the MSBuild Toolset version is the
same as the Visual Studio version number. MSBuild defaults to this
Toolset within Visual Studio and on the command line, regardless of
the toolset version specified in project file. This behavior can be
overridden by using the /ToolsVersion flag. For more information, see
Overriding ToolsVersion Settings.
Incidentally, to verify which MSBuild toolsets are available on a machine and where they are located, you can just open up PowerShell and run:
dir HKLM:\Software\Microsoft\MSBuild\ToolsVersions

TypeScript 1.4 for visual studio 2012

I have downloaded typescript for vs2012 from the below link
http://www.microsoft.com/en-in/download/details.aspx?id=34790
but it is giving 1.0 version but i want to work with 1.4(latest)
Is there a way to install typescript 1.4 for vs2012.
You need to use Visual Studio 2013 or above to use the latest version of TypeScript.
There is a free community edition, if you satisfy the licensing rules.
You can also use Atom (with Atom TypeScript), Sublime, WebStorm, and a few others too - so you aren't tied to Visual Studio.

Visual Studio 2012 Update 3 - Typescript not working

I am using Visual Studio 2012 Professional with Update 3.
I have installed Typescript from TypeScript for Visual Studio 2012 and 2013
.
It is possible for me to add a new typescript file using "Add > New Item...".
But neither the editor shows the split screen (with the javascript preview) nor the .js file gets generated if i save the .ts file or build the project.
On my machine at work i have done the excactly same things withouth any problem and it works.
Please help!
thanks in advance
That's the default functionality with the latest plugin combination. See TypeScript not compiling with WE3 and TS 0.9.1.1

Resources