Typescript compile error in data-interface.ts
icsaszar opened this issue · comments
I'm trying to use this along with vis-network
for a project with typescript, but I keep getting the following error:
vis-data/src/data-interface.ts
Line 49 in 5ca23ac
node_modules/vis-data/declarations/data-interface.d.ts:33:67 - error TS2304: Cannot find name 'Node'.
33 export declare type DeepPartial<T> = T extends any[] | Function | Node ? T : T extends object ? {
~~~~
Removing Node
seems to fix the issue, but I'm not sure if it won't break something else.
My guess is that you don't have DOM types installed. Node is the parent type of HTMLElement etc. Removing it would break some type checking (it would no longer be required to be a valid Node, HTMLElement and so on).