mirror of
https://github.com/firecrawl/anydoc.git
synced 2026-09-14 14:18:33 +08:00
8f05b1a3db
- `code` on the rejection names the ConvertError variant, so callers branch on it rather than on the message text - napi fills `code` from the error's status, so the rejection is rebuilt in Task::reject, the one place with an Env to build a JS error with - ConvertErrorCode reaches index.d.ts through a dts header file, which survives regeneration
21 lines
766 B
TypeScript
21 lines
766 B
TypeScript
/* auto-generated by NAPI-RS */
|
|
/* eslint-disable */
|
|
/**
|
|
* `code` on the `Error` a failed conversion rejects with. Conversion fails
|
|
* only when no meaningful Markdown could be produced; producer quirks are
|
|
* recovered or skipped instead.
|
|
*/
|
|
export type ConvertErrorCode =
|
|
/** Unknown format, or one that cannot be converted (an image-only PDF). */
|
|
| 'unsupported'
|
|
/** Structurally unusable: no meaningful content could be extracted. */
|
|
| 'malformed'
|
|
/** Encrypted or password-protected. */
|
|
| 'encrypted'
|
|
/** Crossed a fixed safety limit (decompression, nesting, node count). */
|
|
| 'resourceLimit'
|
|
/** A part required for any meaningful output is absent. */
|
|
| 'missingPart'
|
|
/** The file could not be read, from `toMarkdown` only. */
|
|
| 'io'
|