问题
Where can I find the Typescript definition files for Dropbox v2 api and how do I load them into VS Code? I tried several times and cannot seem to figure it out. Most other libraries don't have any problems.
回答1:
The typings are included with the Dropbox V2 library when you npm install
the library.
You can tell by looking at the source code for the library, specifically at its package.json. If the package.json includes a key called typings
, that means the TypeScript types are bundled with the source code, and will be installed along with the code when you npm install
the library.
If the typings don't work for you in VSCode, there is some other issue - how are you installing the Dropbox library?
来源:https://stackoverflow.com/questions/43647793/typescript-type-definition-for-dropbox-v2-javascript-api