Enable @typescript-eslint/explicit-function-return-type in /src (#9788)

* Enable `@typescript-eslint/explicit-member-accessibility` on /src

* Prettier

* Enable `@typescript-eslint/explicit-function-return-type` in /src

* Fix types

* tsc strict fixes

* Delint

* Fix test

* Fix bad merge
This commit is contained in:
Michael Telatynski 2023-01-12 13:25:14 +00:00 committed by GitHub
parent 7a36ba0fde
commit 030b7e90bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
683 changed files with 3459 additions and 3013 deletions

View file

@ -68,7 +68,7 @@ export default class Sizer {
return offset;
}
public getDesiredItemSize(item: HTMLElement) {
public getDesiredItemSize(item: HTMLElement): string {
if (this.vertical) {
return item.style.height;
} else {
@ -76,7 +76,7 @@ export default class Sizer {
}
}
public setItemSize(item: HTMLElement, size: string) {
public setItemSize(item: HTMLElement, size: string): void {
if (this.vertical) {
item.style.height = size;
} else {
@ -84,7 +84,7 @@ export default class Sizer {
}
}
public clearItemSize(item: HTMLElement) {
public clearItemSize(item: HTMLElement): void {
if (this.vertical) {
item.style.height = null;
} else {
@ -92,16 +92,16 @@ export default class Sizer {
}
}
public start(item: HTMLElement) {}
public start(item: HTMLElement): void {}
public finish(item: HTMLElement) {}
public finish(item: HTMLElement): void {}
/**
@param {MouseEvent} event the mouse event
@return {number} the distance between the cursor and the edge of the container,
along the applicable axis (vertical or horizontal)
*/
public offsetFromEvent(event: MouseEvent) {
public offsetFromEvent(event: MouseEvent): number {
const pos = this.vertical ? event.pageY : event.pageX;
if (this.reverse) {
return this.getPageOffset() + this.getTotalSize() - pos;