I'm designing a web application using Node.js with Angular, Typescript, and d3.js (among other things). The application is up and running with library functionality working as expected. However, I'm unable to properly compile my Typescript files, as I'm running into errors with the type definitions for d3 (see below).
Error:(182, 27) TS2339:Property 'time' does not exist on type 'typeof
"C:/Users/my.user/project/workspace/node_modules/@types/d3/index"'.
Error:(187, 27) TS2339:Property 'scale' does not exist on type 'typeof
"C:/Users/my.user/project/workspace/node_modules/@types/d3/index"'.
Error:(193, 28) TS2339:Property 'svg' does not exist on type 'typeof
"C:/Users/my.user/project/workspace/node_modules/@types/d3/index"'.
Error:(195, 47) TS2339:Property 'time' does not exist on type 'typeof
"C:/Users/my.user/project/workspace/node_modules/@types/d3/index"'.
Error:(258, 28) TS2339:Property 'svg' does not exist on type 'typeof
"C:/Users/my.user/project/workspace/node_modules/@types/d3/index"'.
Error:(915, 23) TS2339:Property 'svg' does not exist on type 'typeof
"C:/Users/my.user/project/workspace/node_modules/@types/d3/index"'.
Error:(970, 25) TS2339:Property 'svg' does not exist on type 'typeof
"C:/Users/my.user/project/workspace/node_modules/@types/d3/index"'.
Error:(1147, 21) TS2339:Property 'svg' does not exist on type 'typeof
"C:/Users/my.user/project/workspace/node_modules/@types/d3/index"'.
These properties seem to be working fine, but the typescript compiler doesn't recognize them, indicating that there's something wrong with my @types/d3 dependency.
The version of d3.js that I'm using is 3.4.8, and the version for @types/d3 is 4.3.0.
I'm sure these two versions don't match, but I still need to find a pair of version numbers that match, and also offer the properties that Typescript isn't recognizing.
Can anybody recommend a combination for these libraries that would work given the properties I need to access? I'm assuming that my typings for d3 are behind in some way, so perhaps an older version would be suitable? If somebody has an answer, or even a systematic way to find out what version I would need, that would be extremely helpful.