Shared TypeScript types and interfaces used across the ecosystem:
import type {
ApplyRule,
DirCopyArgs,
DirError,
EpubInfo,
EpubMoveResult,
EpubObj,
EpubSetup,
FileHandlerArgs,
FileInfo,
FileObj,
FileType,
FileWriterArgs,
ObjectSetupOptions,
PathError,
PubProcessArgs,
SeriesInfo,
SetupResult,
TmpResult,
UnzipInput,
} from '@epubknowledge/common/types'| Type | Description |
|---|---|
PathError / DirError |
Error return shapes for path and directory helpers |
DirCopyArgs |
Input object for dirCopy({ inputDir, outputDir }) |
FileHandlerArgs |
Input object for fileHandler({ file, dest, data }) |
PubProcessArgs |
Internal/shared input shape used by EPUB validation helpers |
FileWriterArgs |
Input object for fileWriter({ filePath, data, json }) |
FileType |
Simple file kind union: 'text' | 'json' |
FileInfo |
Parsed file metadata including fullPath |
FileObj |
Parsed file metadata including name, ext, fullName, and parent |
TmpResult |
Result of creating a tmp directory, including dir, nuke, and optional locally |
UnzipInput |
Input shape for the unzip helper |
EpubInfo / EpubObj / EpubMoveResult / EpubSetup |
EPUB file and directory descriptors |
ObjectSetupOptions / SetupResult |
CLI/script setup options and their resolved result |
SeriesInfo |
Minimal labeled series descriptor |
ApplyRule |
Rule descriptor used by applyRules() in misc |