chore(client): fix most type errors

This commit is contained in:
Elian Doran
2025-05-28 20:42:21 +03:00
parent cb7aee742e
commit 26c1cbeff1
26 changed files with 75 additions and 79 deletions

View File

@@ -85,7 +85,7 @@ export default class NotePathsWidget extends NoteContextAwareWidget {
this.$notePathIntro.text(t("note_paths.intro_not_placed"));
}
const renderedPaths = [];
const renderedPaths: JQuery<HTMLElement>[] = [];
for (const notePathRecord of sortedNotePaths) {
const notePath = notePathRecord.notePath;
@@ -100,7 +100,7 @@ export default class NotePathsWidget extends NoteContextAwareWidget {
const $pathItem = $("<li>");
const pathSegments: string[] = [];
const lastIndex = notePath.length - 1;
for (let i = 0; i < notePath.length; i++) {
const noteId = notePath[i];
pathSegments.push(noteId);
@@ -109,13 +109,13 @@ export default class NotePathsWidget extends NoteContextAwareWidget {
$noteLink.find("a").addClass("no-tooltip-preview tn-link");
$pathItem.append($noteLink);
if (i != lastIndex) {
$pathItem.append(" / ");
}
}
const icons = [];
const icons: string[] = [];
if (this.notePath === notePath.join("/")) {
$pathItem.addClass("path-current");

View File

@@ -122,7 +122,7 @@ export default class PromotedAttributesWidget extends NoteContextAwareWidget {
return;
}
const $cells = [];
const $cells: JQuery<HTMLElement>[] = [];
for (const definitionAttr of promotedDefAttrs) {
const valueType = definitionAttr.name.startsWith("label:") ? "label" : "relation";