From bb9faf7caf9e163f0a96767eaa9c8c1a8a8bc350 Mon Sep 17 00:00:00 2001 From: Hailong Wang Date: Tue, 21 Sep 2021 09:09:24 +0800 Subject: [PATCH] writeFileAsync type def [ci skip] --- types/index.d.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/types/index.d.ts b/types/index.d.ts index 6b431db..a2174d2 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -18,6 +18,9 @@ export function readFile(filename: string, opts?: ParsingOptions): WorkBook; export function read(data: any, opts?: ParsingOptions): WorkBook; /** Attempts to write or download workbook data to file */ export function writeFile(data: WorkBook, filename: string, opts?: WritingOptions): any; +/** Attempts to write or download workbook data to file asynchronously */ +type CBFunc = () => void; +export function writeFileAsync(filename: string, data: WorkBook, opts: WritingOptions | CBFunc, cb?: CBFunc): any; /** Attempts to write the workbook data */ export function write(data: WorkBook, opts?: WritingOptions): any;