mirror of
https://github.com/zadam/trilium.git
synced 2025-10-26 07:46:30 +01:00
chore(client/print): fix typecheck issues
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import type child_process from "child_process";
|
||||
import { describe, beforeAll, afterAll } from "vitest";
|
||||
|
||||
let etapiAuthToken: string | undefined;
|
||||
@@ -12,8 +11,6 @@ type SpecDefinitionsFunc = () => void;
|
||||
|
||||
function describeEtapi(description: string, specDefinitions: SpecDefinitionsFunc): void {
|
||||
describe(description, () => {
|
||||
let appProcess: ReturnType<typeof child_process.spawn>;
|
||||
|
||||
beforeAll(async () => {});
|
||||
|
||||
afterAll(() => {});
|
||||
|
||||
@@ -23,7 +23,7 @@ interface NoteListProps {
|
||||
isEnabled: boolean;
|
||||
ntxId: string | null | undefined;
|
||||
media: ViewModeMedia;
|
||||
onReady: () => void;
|
||||
onReady?: () => void;
|
||||
}
|
||||
|
||||
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} />
|
||||
}
|
||||
|
||||
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 viewType = useNoteViewType(note);
|
||||
const noteIds = useNoteIds(note, viewType, ntxId);
|
||||
@@ -79,6 +79,7 @@ export function CustomNoteList<T extends object>({ note, isEnabled: shouldEnable
|
||||
highlightedTokens,
|
||||
viewConfig: viewModeConfig[0],
|
||||
saveConfig: viewModeConfig[1],
|
||||
onReady: onReady ?? (() => {}),
|
||||
...restProps
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user