Typescript 4 support

Hello, we would like to use typescript 4.0 syntax but when we use it, sonar does not understand this syntax.

Sonarqube 8.4 has addnotation about typescript’s version:

Supported Frameworks and Versions

  • TypeScript >=3.2.1 <3.8.0. If it’s not possible to upgrade version of TypeScript used by the project, consider installing supported TypeScript version just for the time of analysis.

maybe it’s time to support typescript 4.0?

Sonarqube does not understand this syntax: ([questionId, answer]: [string, string[] | string]

FWIW I’m still waiting on support for the optional-chaining operator which was added in TS 3.7. It’s been fixed but I don’t think the fix has landed on the Sonar server I use yet. I figure 4.X support could take a pretty long time…


The work to support the latest version of TypeScript 3.x is done (see https://jira.sonarsource.com/browse/MMF-2107) but unfortunately the deployment of this on SonarCloud is delayed. It will be part of SonarQube 8.5 that will be released end of Sept 2020.

Are you aware of any syntax changes between 3.9 and 4.0?


From the release notes:

  • Variadic and labeled tuples
  • new assignment operators: &&= , ||= , and ??=
  • You still can’t type catch arguments generally but now catch (e: unknown) is valid

I’m sharing an update about support of TypeScript 3.9 / 4.0. TypeScript 3.9 was supposed to come with SQ 8.5 but this was reverted. We realized that a lot of users on SonarCloud still rely on NodeJS 8 environment to run their scans and supporting TypeScript 3.9 requests to move to NodeJS 10. We gave time to these users to move to NodeJS 10 and so supporting latest versions of TypeScript will come but after the 16th of November.