我不明白types字段的含义tsconfig.json.在文档中我读过这样的文字:
"types": {
"description": "Type declaration files to be included in compilation. Requires TypeScript version 2.0 or later.",
"type": "array",
"items": {
"type": "string"
}
},
Run Code Online (Sandbox Code Playgroud)
到目前为止,据我所知,如果我安装,@types/express我应该添加这样的字符串tsconfig.json
{
"compilerOptions": {
...
"types": ["lodash"]
}
}
Run Code Online (Sandbox Code Playgroud)
但没有它,一切都很好.现在我不明白,为什么我需要types田地