forked from akai/readest
80105af839
* fix: add missing TXT worker files for large import path * fix(ios): decode import paths and stabilize large TXT conversion * style(txt): run prettier on TXT conversion files * fix(txt): restore chunk iterator API and stream cancel behavior * fix(txt): avoid unused private segment iterator * chore: clean up log for unit tests --------- Co-authored-by: Huang Xin <chrox.huang@gmail.com>
29 lines
544 B
TypeScript
29 lines
544 B
TypeScript
export interface TxtConverterWorkerRequest {
|
|
type: 'convert';
|
|
payload: {
|
|
file: File;
|
|
author?: string;
|
|
language?: string;
|
|
};
|
|
}
|
|
|
|
export interface TxtConverterWorkerSuccess {
|
|
type: 'success';
|
|
payload: {
|
|
epubBuffer: ArrayBuffer;
|
|
name: string;
|
|
bookTitle: string;
|
|
chapterCount: number;
|
|
language: string;
|
|
};
|
|
}
|
|
|
|
export interface TxtConverterWorkerError {
|
|
type: 'error';
|
|
payload: {
|
|
message: string;
|
|
};
|
|
}
|
|
|
|
export type TxtConverterWorkerResponse = TxtConverterWorkerSuccess | TxtConverterWorkerError;
|