问题
I'm in environment with blocked access to github, typing and I want to have enhanced intellisense in vscode.
To do so I suppose I need to copy cached typescript definitions from machine that does have it for various needed npm packages.
So question where I can find those cached ata ts files?
回答1:
Please consider an alternative, but here are the standard locations:
- Mac:
~/Library/Caches/TypeScript
- Windows:
%LOCALAPPDATA%\Microsoft\TypeScript
- Linux:
~/.cache/typescript/
As a better solution, if you cannot rely on automatic typings acquisition, you can manually manage type typings files. Here's some documentation information. For example:
$ npm install --save @types/express
This will download a copy of the express typings files to the normal node_modules
folder your project. If you can't use npm, this is a much better place to copy files between.
Typings files are required to builds TypeScript projects, but are only used to enhance VSCode IntelliSense with JavaScript projects.
Hope that clears things up.
来源:https://stackoverflow.com/questions/40941447/where-are-automatic-type-acquisition-typescript-definition-files-saved