Typescript 2.0. “types” field in tsconfig.json
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I do not understand the meaning of types field in tsconfig.json . In documentation I have read such text: "types": { "description": "Type declaration files to be included in compilation. Requires TypeScript version 2.0 or later.", "type": "array", "items": { "type": "string" } }, As far, as I understand if I install @types/express I should add such string in tsconfig.json { "compilerOptions": { ... "types": ["lodash"] } } but everything works fine without it. And now I do not understand, why I need types field 回答1: As of TypeScript 2.* the