Warns on apparent attempts to define constructors for interfaces or new
for classes.
Examples of incorrect code for this rule.
class C {
new(): C;
}
interface I {
new (): I;
constructor(): void;
}
Examples of correct code for this rule.
class C {
constructor() {}
}
interface I {
new (): C;
}
{
"typescript/no-misused-new": "error"
}
- TSLint: no-misused-new