node/typescript not working together #724

Closed
opened 2017-07-10 04:06:24 +00:00 by shaunc · 1 comment
shaunc commented 2017-07-10 04:06:24 +00:00 (Migrated from github.com)

I just installed this package using typescript (2.4.1) and node (7.10.0). I get the error:

node_modules/xlsx/types/index.d.ts(624,26): error TS2304: Cannot find name 'HTMLTableElement'.
node_modules/xlsx/types/index.d.ts(625,25): error TS2304: Cannot find name 'HTMLTableElement'.

I presume this is because HTMLTableElement is a dom construct which is not available in node.

I just installed this package using typescript (2.4.1) and node (7.10.0). I get the error: ``` node_modules/xlsx/types/index.d.ts(624,26): error TS2304: Cannot find name 'HTMLTableElement'. node_modules/xlsx/types/index.d.ts(625,25): error TS2304: Cannot find name 'HTMLTableElement'. ``` I presume this is because `HTMLTableElement` is a dom construct which is not available in node.
SheetJSDev commented 2017-07-10 05:36:42 +00:00 (Migrated from github.com)

@shaunc good catch! looking back, the lint config specifies the DOM library, but that's clearly problematic. Short-term the fix is to just make those any types (we can accept a PR that makes the change in https://github.com/SheetJS/js-xlsx/blob/master/types/index.d.ts#L624-L625 )

@shaunc good catch! looking back, the [lint config](https://github.com/SheetJS/js-xlsx/blob/master/types/tsconfig.json#L4) specifies the DOM library, but that's clearly problematic. Short-term the fix is to just make those `any` types (we can accept a PR that makes the change in https://github.com/SheetJS/js-xlsx/blob/master/types/index.d.ts#L624-L625 )
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#724
No description provided.