incomplete ParsingOptions/WritingOptions interface in Typescript in index.d.ts #1026

Closed
opened 2018-03-07 14:00:18 +00:00 by andrisarkameru · 1 comment
andrisarkameru commented 2018-03-07 14:00:18 +00:00 (Migrated from github.com)

When trying to read an excel xml file generated in ag-grid, I stumbled upon encoding problem.
Then I noticed, that the problem is fixed, when I read workbook with options { type: 'string' } in browser console.

However typescript is not letting me to build such a code, because types description clearly states only following allowed options:

 /** Options for read and readFile */
 export interface ParsingOptions extends CommonOptions {
     /** Input data encoding */
   type?: 'base64' | 'binary' | 'buffer' | 'file' | 'array';

Here is the description for the options:

https://www.npmjs.com/package/xlsx#input-type

The same goes for both WritingOptions options as well as ParsingOptions options

When trying to read an excel xml file generated in ag-grid, I stumbled upon encoding problem. Then I noticed, that the problem is fixed, when I read workbook with options { type: 'string' } in browser console. However typescript is not letting me to build such a code, because types description clearly states only following allowed options: ``` /** Options for read and readFile */ export interface ParsingOptions extends CommonOptions { /** Input data encoding */ type?: 'base64' | 'binary' | 'buffer' | 'file' | 'array'; ``` Here is the description for the options: https://www.npmjs.com/package/xlsx#input-type The same goes for both WritingOptions options as well as ParsingOptions options
andrisarkameru commented 2018-03-07 14:02:23 +00:00 (Migrated from github.com)

Here's my pull request with the following issue fixed:
Pull request #1027

Here's my pull request with the following issue fixed: Pull request #1027
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sheetjs/sheetjs#1026
No description provided.