Skip to content

Tankōbon / shared/data / ImportResult

Type Alias: ImportResult ​

ImportResult = { status: "cancelled"; } | { added: number; filePath: string; status: "imported"; updated: number; } | { message: string; status: "error"; }

Defined in: shared/data.ts:28

Outcome of importing a previously exported JSON snapshot. Validation failures are part of the result rather than a thrown error: an ipcMain.handle rejection reaches the renderer wrapped in "Error invoking remote method …", which is not something to show the user.