![]() Server : Apache/2 System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64 User : gositeme ( 1004) PHP Version : 8.2.29 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname Directory : /home/gositeme/domains/lavocat.quebec/private_html/node_modules/mammoth/lib/ |
interface Mammoth {
convertToHtml: (input: Input, options?: Options) => Promise<Result>;
extractRawText: (input: Input) => Promise<Result>;
embedStyleMap: (input: Input, styleMap: string) => Promise<{
toArrayBuffer: () => ArrayBuffer,
toBuffer: () => Buffer,
}>;
images: Images;
}
type Input = NodeJsInput | BrowserInput;
type NodeJsInput = PathInput | BufferInput;
interface PathInput {
path: string;
}
interface BufferInput {
buffer: Buffer;
}
type BrowserInput = ArrayBufferInput;
interface ArrayBufferInput {
arrayBuffer: ArrayBuffer;
}
interface Options {
styleMap?: string | Array<string>;
includeEmbeddedStyleMap?: boolean;
includeDefaultStyleMap?: boolean;
convertImage?: ImageConverter;
ignoreEmptyParagraphs?: boolean;
idPrefix?: string;
externalFileAccess?: boolean;
transformDocument?: (element: any) => any;
}
interface ImageConverter {
__mammothBrand: "ImageConverter";
}
interface Image {
contentType: string;
readAsArrayBuffer: () => Promise<ArrayBuffer>;
readAsBase64String: () => Promise<string>;
readAsBuffer: () => Promise<Buffer>;
read: ImageRead;
}
interface ImageRead {
(): Promise<Buffer>;
(encoding: string): Promise<string>;
}
interface ImageAttributes {
src: string;
}
interface Images {
dataUri: ImageConverter;
imgElement: (f: (image: Image) => Promise<ImageAttributes>) => ImageConverter;
}
interface Result {
value: string;
messages: Array<Message>;
}
type Message = Warning | Error;
interface Warning {
type: "warning";
message: string;
}
interface Error {
type: "error";
message: string;
error: unknown;
}
declare const mammoth: Mammoth;
export = mammoth;