No worries TypeScript definition manager.
- No dependency on DefinitelyTyped GitHub repo. No PRs to send. No PRs to accept.
- ... and no custom registries either. Everything is in NPM.
- No fear of hitting GitHub rate-limit.
- No need to commit
typings/**or full of opaque hashes
/// <reference path="..."/>s all over your code.
- No special
<insert your definition manager>.json.
package.jsonis all you need.
- Easy version management.
- One responsibility - wiring type definitions in. Installation, shinkwrapping, etc. is all offloaded on to
- Nothing to learn. If you know how to use
npm- you're pretty much all set.
npm install -g tsdm
For any package that doesn't come with typings
npm to install external definition (e.g.
npm install --save-dev ...).
After that - run
tsdm rewire. That's it.
npm i retyped-react-tsd-ambient --save-dev && tsdm rewire
compilerOptions.moduleResolutionhas to be set to node (in your tsconfig.json)
Most (if not all) DefinitelyTyped typings are available through retyped. npmsearch is an excellent place to find many more.
If you need a quick way to add declaration for the module that doesn't yet have definition available on
npmyou can add it to
<project root>/.tsdm.d.ts. This is meant a temporary solution only. Please consider contributing missing typings back to the community.
DEMO @ shyiko/typescript-boilerplate