Add Packer.pack and Packer.toArrayBuffer (#2959)
* Add Packer.pack and Packer.toArrayBuffer To mirror patchDocument's outputType parameter. See https://github.com/dolanmiu/docx/discussions/2920 * Ignore coverage --------- Co-authored-by: Dolan Miu <dolan_miu@hotmail.com>
This commit is contained in:
18
src/util/output-type.ts
Normal file
18
src/util/output-type.ts
Normal file
@ -0,0 +1,18 @@
|
||||
/* v8 ignore start */
|
||||
// Simply type definitions. Can ignore testing and coverage
|
||||
// From JSZip
|
||||
export type OutputByType = {
|
||||
readonly base64: string;
|
||||
// eslint-disable-next-line id-denylist
|
||||
readonly string: string;
|
||||
readonly text: string;
|
||||
readonly binarystring: string;
|
||||
readonly array: readonly number[];
|
||||
readonly uint8array: Uint8Array;
|
||||
readonly arraybuffer: ArrayBuffer;
|
||||
readonly blob: Blob;
|
||||
readonly nodebuffer: Buffer;
|
||||
};
|
||||
|
||||
export type OutputType = keyof OutputByType;
|
||||
/* v8 ignore stop */
|
Reference in New Issue
Block a user