-
-
Notifications
You must be signed in to change notification settings - Fork 169
Closed
Labels
Description
Motivation
TypeScript supports override and private keywords, but overrideReplacesDocs and ignorePrivate do not work with them. They require the jsdoc annotations.
Current behavior
export abstract class A {
/**
* The update method called every tick.
*
* @param deltaTime The time passed since last frame in seconds.
*/
public abstract update(deltaTime: number): void;
// Missing JSDoc comment. eslint (jsdoc/require-jsdoc)
private doStuff() {
// ....
}
}
export class B extends A {
// Missing JSDoc comment. eslint (jsdoc/require-jsdoc)
public override update(deltaTime: number) {
// ...
}
}Desired behavior
export abstract class A {
/**
* The update method called every tick.
*
* @param deltaTime The time passed since last frame in seconds.
*/
public abstract update(deltaTime: number): void;
// OK
private doStuff() {
// ....
}
}
export class B extends A {
// OK
public override update(deltaTime: number) {
// ...
}
}Alternatives considered
- Manually adding
@privateand@overrideto the jsdoc. - Disabling the eslint rule on a per line basis
Thanks for the good work!