Vicky
Vicky

Reputation: 1

I want to create typings file for crypto-json js library

I want to import this crypto-json JavaScript library in typescript file. When I tried running this command "typings install dt~crypto-json --global --save" but got the below error

typings ERR! system Windows_NT 10.0.14393 typings ERR! command "D:\Backup\EnvironmentVariables\node-v6.9.5-win-x64\node.exe" "D:\Backup\EnvironmentVariables\node-v6.9.5-win-x64\node_modules\typings\dist\bin.js" "install" "dt~crypto-json" "--save" "--global" typings ERR! node -v v6.9.5 typings ERR! typings -v 2.1.1 typings ERR! typings ERR! If you need help, you may report this error at: typings ERR! https://github.com/typings/typings/issues

using typings version 2.1.1

Upvotes: 0

Views: 56

Answers (2)

Drenai
Drenai

Reputation: 12357

There is probably no TypeScript definitions library for crypto-json.

You can go to https://microsoft.github.io/TypeSearch/, to check if typing files exist for a library.

For example, there is one for https://www.npmjs.com/package/@types/crypto-js, but none show up for crypto-json.

You can look up tutorials of how to use JavaScript libraries when no Type Definition is available

Upvotes: 0

Joe Clay
Joe Clay

Reputation: 35807

DefinitelyTyped doesn't have any typings for crypto-json. You'll have to write them yourself if you want them (and then preferably publish them so others can benefit).

Additionally, you should probably move away from the Typings CLI - it's effectively been deprecated, as you can now install type definitions using NPM.

Upvotes: 1

Related Questions