fix: replace more any types with more specific types to fix linting errors

This commit is contained in:
codegen-sh[bot] committed 2025-08-18 22:15:05 +00:00
1 parent 94eb1aa07d
commit cbcf7d6a8e
2 files changed
+4 -4

No files matched your search

@@ -825,7 +825,7 @@ describe("#documents.list", () => {
const body = await res.json();
expect(res.status).toEqual(200);
expect(body.data).toHaveLength(2);
const docIds = body.data.map((doc: any) => doc.id);
const docIds = body.data.map((doc: { id: string }) => doc.id);
expect(docIds).toContain(docs[0].id);
expect(docIds).toContain(docs[1].id);
expect(docIds).not.toContain(docs[2].id);
@@ -5361,7 +5361,7 @@ describe("#documents.documents", () => {
expect(res.status).toBe(200);
expect(body.data.id).toBe(parent.id);
const childIds = body.data.children.map((node: any) => node.id);
const childIds = body.data.children.map((node: { id: string }) => node.id);
expect(childIds).toContain(child1.id);
expect(childIds).toContain(child2.id);
});
+2 -2
View File
@@ -14,7 +14,7 @@ const stripEmojis = (value: string) => value.replace(regex, "");
const cleanValue = (value: string) => stripEmojis(deburr(value));
function getSortByField<T extends Record<string, any>>(
function getSortByField<T extends Record<string, unknown>>(
item: T,
keyOrCallback: string | ((item: T) => string)
) {
@@ -25,7 +25,7 @@ function getSortByField<T extends Record<string, any>>(
return cleanValue(field);
}
function naturalSortBy<T extends Record<string, any>>(
function naturalSortBy<T extends Record<string, unknown>>(
items: T[],
key: string | ((item: T) => string),
sortOptions?: NaturalSortOptions