简体   繁体   English

nodejs中node_modules中的@type文件夹是什么?

[英]what is @type folder in node_modules in nodejs?

I have node version 8.9.1 and npm version 5.5.1.我有节点版本 8.9.1 和 npm 版本 5.5.1。

After installing packages using npm install , a folder named @types in node_modules is created.使用npm install安装软件包后,会在 node_modules 中创建一个名为 @types 的文件夹。 What is purpose of this folder?.这个文件夹的目的是什么? Is it ok to delete it from node_modules folder?可以从 node_modules 文件夹中删除它吗?

This @types scoped package is where we can find a ton of useful type definitions, such as for example the type definitions of node that allow us to use require for example.在@types 范围内的 package 中,我们可以找到大量有用的类型定义,例如允许我们使用require的 node 的类型定义。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM