TS Version: 5.2
override keyword enforcement, stricter method declarations
Affected Files:
- abortError.ts
- apiError.ts
- argumentsValidationError.ts
- responseValidationError.ts
Problem:
Currently, overridden methods in classes do not explicitly use override, making refactoring error-prone.
Proposed Solution:
Add the override keyword to methods that are intended to override a base class method.
Example Fix (abortError.ts):
class AbortError extends Error {
constructor(message: string, cause?: unknown) {
super(message, { cause });
this.name = "AbortError";
}
}
TS Version: 5.2
override keyword enforcement, stricter method declarations
Affected Files:
Problem:
Currently, overridden methods in classes do not explicitly use override, making refactoring error-prone.
Proposed Solution:
Add the override keyword to methods that are intended to override a base class method.
Example Fix (abortError.ts):