[node-xlsx] Support node-xlsx 0.15.0 (#42260)

This commit is contained in:
Lionel
2020-02-25 13:51:00 -08:00
committed by GitHub
parent ae9798b78c
commit e40242d405
2 changed files with 9 additions and 3 deletions
+3 -2
View File
@@ -1,6 +1,7 @@
// Type definitions for node-xlsx 0.12
// Type definitions for node-xlsx 0.15
// Project: https://github.com/mgcrea/node-xlsx#readme
// Definitions by: chenc <https://github.com/cWatermelon>
// kinuxroot <https://github.com/kinuxroot>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.0
@@ -25,7 +26,7 @@ export function parse(
* @returns returns a buffer of worksheets
*/
export function build(
worksheets: Array<{ name: string; data: any[][] }>,
worksheets: Array<{ name: string; data: any[][]; options?: {} }>,
options?: {}
): ArrayBuffer;
declare const _default: {
+6 -1
View File
@@ -5,4 +5,9 @@ const data = [
['foo', 'bar', new Date('2014-02-19T14:30Z'), '0.3'],
['baz', null, 'qux'],
];
const buffer = build([{ name: 'mySheetName', data }]);
const options = { '!merges': [{ s: { c: 0, r: 0 }, e: { c: 11, r: 0 } }] };
const buffer1 = build([{ name: 'mySheetName1', data }]);
const buffer2 = build([{ name: 'mySheetName2', data }], options);
const buffer3 = build([{ name: 'mySheetName3', data, options}]);