I think TSConfig types option doesn't work as stated in the TS docs.
I installed npm packages, express, @types/express, node, @types/node, lodash, @types/lodash and moment.
And i wrote TSConfig like below.
{
"include": ["./main.ts", "./src"],
"exclude": ["./src/**/DummyComp.ts"],
"compilerOptions": {
"outDir": "./dist",
"target": "ES5",
"types": ["node", "express"]
}
}
As mentioned in TS docs, only type definition files of node and express should be included and will have exports appear as auto-import recommendations.
But auto-import recommendation of moment and lodash (omitted in type option) appear like below image.
How is this possible?
As stated in TS docs, lodash and moment's auto-import recommendations don't appear.


The only way to exclude from VS Code auto-import suggestions (files that need to be included) is to use:
If the files don't have to compiled, you can use the
excludeproperty intsconfig.json.