UNPKG

comic-book-dl

Version:
29 lines (28 loc) 833 B
import type { ChaptersItem } from './lib/parse/base'; interface RunHooks { parseErr?: () => void; downloadInterrupted?: () => void; start?: (bookName: string) => void; error?: (bookName: string, chaptersList: ChaptersItem[], errorList: ErrorChapterItem[]) => void; success?: (bookName: string, distPath: string, chaptersList: ChaptersItem[] | null) => void; } export interface ErrorChapterItem { bookName: string; imgUrl?: string; chapter: ChaptersItem; } interface IgnoreBook { name: string; chapter?: string[]; } export interface UserConfig { ignore?: IgnoreBook[]; } export interface Config { bookPath: string; targetUrl: string; ignoreConsole?: boolean; userConfig?: UserConfig; } export declare function run(config: Config, hooks: RunHooks): Promise<void>; export {};