chore: More typescript FIXME's removed

This commit is contained in:
Tom Moor
2022-01-06 21:25:42 -08:00
parent 8d05c752ea
commit c6cc04cad8
58 changed files with 199 additions and 221 deletions

View File

@@ -353,7 +353,7 @@ class Collection extends ParanoidModel {
}
getDocumentTree = function (documentId: string): NavigationNode {
let result: NavigationNode;
let result!: NavigationNode;
const loopChildren = (documents: NavigationNode[]) => {
if (result) {
@@ -375,7 +375,6 @@ class Collection extends ParanoidModel {
loopChildren(this.documentStructure);
// @ts-expect-error used before undefined
return result;
};
@@ -479,7 +478,7 @@ class Collection extends ParanoidModel {
};
getDocumentParents = function (documentId: string): string[] | void {
let result: string[];
let result!: string[];
const loopChildren = (documents: NavigationNode[], path: string[] = []) => {
if (result) {
@@ -499,7 +498,6 @@ class Collection extends ParanoidModel {
loopChildren(this.documentStructure);
}
// @ts-expect-error used before undefined
return result;
};