diff --git a/types/index.d.ts b/types/index.d.ts index a9cf0a8..131bd2f 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -62,7 +62,8 @@ export function writeFileAsync(filename: string, data: WorkBook, opts: WritingOp export function write(data: WorkBook, opts: WritingOptions): T extends 'buffer' ? Uint8Array : T extends 'array' ? ArrayBuffer : string; /** Attempts to write the workbook data as XLSX */ -export function writeXLSX(data: WorkBook, opts: WritingOptions): void; +export function writeXLSX(data: WorkBook, opts: WritingOptions): + T extends 'buffer' ? Uint8Array : T extends 'array' ? ArrayBuffer : string; /** Utility Functions */ export const utils: XLSX$Utils; @@ -282,7 +283,7 @@ export interface ParsingOptions extends UTCOption, CommonOptions, DenseOption { PRN?: boolean; } -type WritingOptionsType = 'base64' | 'binary' | 'buffer' | 'file' | 'array' | 'string'; +export type WritingOptionsType = 'base64' | 'binary' | 'buffer' | 'file' | 'array' | 'string'; /** Options for write and writeFile */ export interface WritingOptions extends CommonOptions {