prefer-return-this-type
Configuration
rslint.config.ts
Rule Details
Enforce that this is used when only this type is returned. If a class method's return type is the class itself and the method only returns this, then it is better to use this as the return type. Using the this return type enables proper type narrowing in subclasses, since this refers to the current class type rather than a fixed class name.
Examples of incorrect code for this rule:
Examples of correct code for this rule: