All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sonar.l10n.javascript.rules.javascript.S4137.html Maven / Gradle / Ivy

There is a newer version: 10.17.0.28100
Show newest version

Why is this an issue?

Type assertion can be done in two ways: with as MyType or with <MyType>. But since there is an ambiguity in the latter when using JSX and there is no ambiguity in the former, as is preferred.

Noncompliant code example

var foo = <any>"foo";  // Noncompliant

Compliant solution

var foo = "foo" as any;




© 2015 - 2024 Weber Informatics LLC | Privacy Policy