sheet_add_dom issue #2427

Closed
opened 2021-10-20 12:20:00 +00:00 by Luudoo · 2 comments
Luudoo commented 2021-10-20 12:20:00 +00:00 (Migrated from github.com)

Hi,

Trying to use 'sheet_add_dom' in my angular project, but having problems with building.
The code work fine while running in browsersync, even if i have non critical error, but the build fail on this error.
The error is about the options of 'table_to_sheet' utility function, whereas i'm using 'sheet_add_dom' function !!!

Argument of type '{ raw: true; origin: number; }' is not assignable to parameter of type 'Table2SheetOpts'.
Object literal may only specify known properties, and 'origin' does not exist in type 'Table2SheetOpts'.

Any idea of what is going wrong ?

Thanks

Hi, Trying to use 'sheet_add_dom' in my angular project, but having problems with building. The code work fine while running in browsersync, even if i have non critical error, but the build fail on this error. The error is about the options of '`table_to_sheet`' utility function, whereas i'm using '`sheet_add_dom`' function !!! ``` Argument of type '{ raw: true; origin: number; }' is not assignable to parameter of type 'Table2SheetOpts'. Object literal may only specify known properties, and 'origin' does not exist in type 'Table2SheetOpts'. ``` Any idea of what is going wrong ? Thanks
SheetJSDev commented 2021-10-20 16:37:16 +00:00 (Migrated from github.com)

The types need to be refreshed. In the interim, you can cast to any. We'd accept a PR with a fix: line 702 of the type def https://github.com/SheetJS/sheetjs/blob/master/types/index.d.ts#L702

-export interface Table2SheetOpts extends CommonOptions, DateNFOption {
+export interface Table2SheetOpts extends CommonOptions, DateNFOption, OriginOption {
The types need to be refreshed. In the interim, you can cast to `any`. We'd accept a PR with a fix: line 702 of the type def https://github.com/SheetJS/sheetjs/blob/master/types/index.d.ts#L702 ```diff -export interface Table2SheetOpts extends CommonOptions, DateNFOption { +export interface Table2SheetOpts extends CommonOptions, DateNFOption, OriginOption { ```
Luudoo commented 2021-10-21 08:08:28 +00:00 (Migrated from github.com)

Thanks, but i'm kind of a noobs, can you explain what to cast where ?

Thanks, but i'm kind of a noobs, can you explain what to cast where ?
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#2427
No description provided.