Relationship between the version of node.js and the version of @types/node

I'm just started using node and wanted to try it with typescript. I did an npm install @types/node and the latest version was 7.0.4:

$ npm install @types/node
[email protected] /home/wink/prgs/test-simple-node-typescript
└── @types/[email protected] 

Where as the latest version of node is 7.5.0:

$ node --version
v7.5.0

What is the relationship between the version of node.js and that of @types/node?


Solution 1:

Simply, the major version and minor version tagged in the semver string of @types/node is exactly corresponding to the node's version.

If you check the index.d.ts file of @types/node in DefinitelyTyped repository, you'll see what type of node is this declaration file for through the first line comment at the top of the file:

// Type definitions for Node.js 8.10.x
// Project: http://nodejs.org/
....