UNPKG

docx

Version:

Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.

20 lines (19 loc) 626 B
/// <reference types="node" /> import { IMediaData } from "./data"; export interface IMediaTransformation { readonly width: number; readonly height: number; readonly flip?: { readonly vertical?: boolean; readonly horizontal?: boolean; }; readonly rotation?: number; } export declare class Media { private readonly map; constructor(); addMedia(data: Buffer | string | Uint8Array | ArrayBuffer, transformation: IMediaTransformation): IMediaData; addImage(key: string, mediaData: IMediaData): void; get Array(): readonly IMediaData[]; private convertDataURIToBinary; }