Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 503
Wink Saville Avatar asked Feb 04 '17 00:02

Wink Saville


People also ask

What is types Node version?

18.8.3 • Public • Published 2 days ago.

Can we have two different version of Node js in the same system?

By Mayank AgarwalNVM allows installing multiple node js versions on the same machine and switching between the required node js version.

What is the relationship between nodejs and npm?

node is a framework that can run JavaScript code on your machine while npm is a package manager. Using npm we can install and remove javascript packages also known as node modules.

What is the difference between Node version and npm version?

Node. js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices; npm: The package manager for JavaScript. npm is the command-line interface to the npm ecosystem.


1 Answers

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/ .... 
like image 177
千木郷 Avatar answered Oct 12 '22 12:10

千木郷