chore(ui): clear helper service any bucket

Replace helper and service any usages with concrete local shapes, typed records, or unknown fallbacks.

Keep runtime behavior unchanged while shrinking the remaining no-explicit-any backlog.

Validation: just ui lint
This commit is contained in:
James Cox
2026-04-22 17:26:50 -04:00
committed by Zach Yale
parent 2e66fd30b6
commit f7a5d939ae
11 changed files with 55 additions and 27 deletions
@@ -35,7 +35,7 @@ export class MetadataProgressWidgetComponent implements OnInit, OnDestroy {
private readonly t = inject(TranslocoService);
private lastUpdateMap = new Map<string, number>();
private timeoutHandles = new Map<string, number>();
private timeoutHandles = new Map<string, ReturnType<typeof setTimeout>>();
private readonly TASK_STALL_TIMEOUT_MS = 60 * 1000; // 1 minute
ngOnInit(): void {
@@ -69,7 +69,7 @@ export class MetadataProgressWidgetComponent implements OnInit, OnDestroy {
taskId,
setTimeout(() => {
this.markTaskStalled(taskId);
}, this.TASK_STALL_TIMEOUT_MS) as any
}, this.TASK_STALL_TIMEOUT_MS)
);
}
}
@@ -16,6 +16,17 @@ import {Tooltip} from 'primeng/tooltip';
import {IconSelection} from '../../../service/icon-picker.service';
import {TranslocoPipe} from '@jsverse/transloco';
type AppMenuItem = MenuItem & {
items?: AppMenuItem[];
routerLink?: string[];
type?: 'library' | 'magicShelf' | 'shelf' | string;
iconType?: string;
unhealthy?: boolean;
bookCount?: number;
hasDropDown?: boolean;
hasCreate?: boolean;
};
@Component({
selector: 'app-menuitem',
templateUrl: './app.menuitem.component.html',
@@ -43,7 +54,7 @@ import {TranslocoPipe} from '@jsverse/transloco';
]
})
export class AppMenuitemComponent implements OnInit, OnDestroy {
@Input() item: any;
@Input() item!: AppMenuItem;
@Input() index!: number;
@Input() @HostBinding('class.layout-root-menuitem') root!: boolean;
@Input() parentKey!: string;
@@ -159,7 +170,7 @@ export class AppMenuitemComponent implements OnInit, OnDestroy {
this.menuService.onMenuStateChange({key: this.key});
}
openDialog(item: any) {
openDialog(item: AppMenuItem) {
if (item.type === 'library' && this.canManipulateLibrary) {
this.dialogLauncher.openLibraryCreateDialog();
}
@@ -56,7 +56,7 @@ export class DialogLauncherService {
}
openDialog(component: unknown, options: object): DynamicDialogRef | null {
return this.dialogService.open(component as Type<any>, {
return this.dialogService.open(component as Type<unknown>, {
...this.defaultDialogOptions,
...options,
});