I created a class (web-component) in which I declared two setters and getters one for expressionValue second for scoreValue. Now I am getting those errors:
All 'expressionValue' signatures should be adjacent @typescript-eslint/adjacent-overload-signatures
All 'scoreValue' signatures should be adjacent @typescript-eslint/adjacent-overload-signatures
And I am wondering how can I fix this error to keep my setters and getters.
Or it is impossible, and only one way to achieve this is to set this @typescript-eslint/adjacent-overload-signatures: 0 in .eslintrc.js file ?
class BinaryExpressionItem extends KKWebComponent implements KKBinaryExpressionItem {
public static TAG: string = `${CONSTANTS.TAG_PREFIX}-binary-expression-tem`;
private readonly expression: HTMLElement = <HTMLElement>this.shadowRoot.querySelector('var');
private readonly score: HTMLElement = <HTMLElement>this.shadowRoot.querySelector('mark');
constructor() {
super(template);
}
set expressionValue(value: string) {
this.expression.textContent = value;
}
set scoreValue(value: string) {
this.score.textContent = value;
}
get expressionValue(): string {
return this.expression.textContent ?? '';
}
get scoreValue(): string {
return this.score.textContent ?? '';
}
}