chore(client/print): fix typecheck issues

This commit is contained in:
Elian Doran
2025-10-20 12:56:46 +03:00
parent 29d6784c59
commit acae069b9e
2 changed files with 3 additions and 5 deletions

View File

@@ -1,4 +1,3 @@
import type child_process from "child_process";
import { describe, beforeAll, afterAll } from "vitest"; import { describe, beforeAll, afterAll } from "vitest";
let etapiAuthToken: string | undefined; let etapiAuthToken: string | undefined;
@@ -12,8 +11,6 @@ type SpecDefinitionsFunc = () => void;
function describeEtapi(description: string, specDefinitions: SpecDefinitionsFunc): void { function describeEtapi(description: string, specDefinitions: SpecDefinitionsFunc): void {
describe(description, () => { describe(description, () => {
let appProcess: ReturnType<typeof child_process.spawn>;
beforeAll(async () => {}); beforeAll(async () => {});
afterAll(() => {}); afterAll(() => {});

View File

@@ -23,7 +23,7 @@ interface NoteListProps {
isEnabled: boolean; isEnabled: boolean;
ntxId: string | null | undefined; ntxId: string | null | undefined;
media: ViewModeMedia; media: ViewModeMedia;
onReady: () => void; onReady?: () => void;
} }
export default function NoteList<T extends object>(props: Pick<NoteListProps, "displayOnlyCollections" | "media" | "onReady">) { export default function NoteList<T extends object>(props: Pick<NoteListProps, "displayOnlyCollections" | "media" | "onReady">) {
@@ -36,7 +36,7 @@ export function SearchNoteList<T extends object>(props: Omit<NoteListProps, "isE
return <CustomNoteList {...props} isEnabled={true} /> return <CustomNoteList {...props} isEnabled={true} />
} }
export function CustomNoteList<T extends object>({ note, isEnabled: shouldEnable, notePath, highlightedTokens, displayOnlyCollections, ntxId, ...restProps }: NoteListProps) { export function CustomNoteList<T extends object>({ note, isEnabled: shouldEnable, notePath, highlightedTokens, displayOnlyCollections, ntxId, onReady, ...restProps }: NoteListProps) {
const widgetRef = useRef<HTMLDivElement>(null); const widgetRef = useRef<HTMLDivElement>(null);
const viewType = useNoteViewType(note); const viewType = useNoteViewType(note);
const noteIds = useNoteIds(note, viewType, ntxId); const noteIds = useNoteIds(note, viewType, ntxId);
@@ -79,6 +79,7 @@ export function CustomNoteList<T extends object>({ note, isEnabled: shouldEnable
highlightedTokens, highlightedTokens,
viewConfig: viewModeConfig[0], viewConfig: viewModeConfig[0],
saveConfig: viewModeConfig[1], saveConfig: viewModeConfig[1],
onReady: onReady ?? (() => {}),
...restProps ...restProps
} }
} }