mindee
Version:
Mindee Client Library for Node.js
30 lines (29 loc) • 915 B
TypeScript
import { Buffer } from "node:buffer";
import { BufferInput } from "../../input";
/**
* Generic class for image extraction
*/
export declare class ExtractedImage {
buffer: Buffer;
protected internalFileName: string;
protected constructor(buffer: Uint8Array, fileName: string);
/**
* Saves the document to a file.
*
* @param outputPath Path to save the file to.
*/
saveToFileAsync(outputPath: string): Promise<void>;
/**
* Attempts to saves the document to a file synchronously.
* Throws an error if the file extension is not supported or if the file could not be saved to disk for some reason.
*
* @param outputPath Path to save the file to.
*/
saveToFile(outputPath: string): void;
/**
* Return the file as a Mindee-compatible BufferInput source.
*
* @returns A BufferInput source.
*/
asSource(): BufferInput;
}