patch: add missing type on optional error in the callback

This commit is contained in:
Beeno Tung 2026-01-16 20:30:01 +08:00
parent 66cf8d2117
commit 265ffd97d5

2
types/index.d.ts vendored

@ -28,7 +28,7 @@ export function writeFile(data: WorkBook, filename: string, opts?: WritingOption
/** Attempts to write or download workbook data to XLSX file */
export function writeFileXLSX(data: WorkBook, filename: string, opts?: WritingOptions): void;
/** Attempts to write or download workbook data to file asynchronously */
type CBFunc = () => void;
type CBFunc = (error?: Error) => void;
export function writeFileAsync(filename: string, data: WorkBook, opts: WritingOptions | CBFunc, cb?: CBFunc): void;
/** Attempts to write the workbook data */
export function write(data: WorkBook, opts: WritingOptions): any;