You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 27, 2021. It is now read-only.
class Frobber<T, U, V> {
private frobee: T & U & V // Replace this intersection type with a type alias. It is also used on lines 3,4. (use-type-alias)
private frobee2: T & U & V
private frobee3: T & U & V
constructor() { }
}
I want to provide the following feedback.
It could very well be that there's some sort of technique of which I'm not aware, in which case I'd be glad to be pointed in the right direction.
The use-type-alias rule suggests me to create a type alias for the T & U & V type. However, these types being parametric to the class in which they're used, I don't think this is actually possible. I've tried defining the type in the body of the class but this is not grammatical. Outside of the class I don't have a reference to the parametric types.
I believe this is a bug.
The text was updated successfully, but these errors were encountered:
I want to report a bug.
SonarTS version: 1.9.0
Node.js version: 8.12.0
TypeScript version: 3.3.3333
TSLint version: 5.12.1
Rule key:
use-type-alias
Reproducer
I want to provide the following feedback.
It could very well be that there's some sort of technique of which I'm not aware, in which case I'd be glad to be pointed in the right direction.
The
use-type-alias
rule suggests me to create a type alias for theT & U & V
type. However, these types being parametric to the class in which they're used, I don't think this is actually possible. I've tried defining the type in the body of the class but this is not grammatical. Outside of the class I don't have a reference to the parametric types.I believe this is a bug.
The text was updated successfully, but these errors were encountered: