The TypeScript Definition Manager.
rm -rf typings/
- The directory contains "main", by default
- Update
tsconfig.json
to match (the bundle file istypings/index.d.ts
)
- Want
main
and/orbrowser
output again? See where the typings install in the FAQ - Usages of
ambient
are nowglobal
- That means in
typings.json
anyambientDependencies
should be renamedglobalDependencies
and anyambientDevDependencies
should be renamedglobalDevDependencies
. - It also means
--ambient
is now--global
- That means in
- Removed
defaultAmbientSource
- If you want to install from DefinitelyTyped, be explicit (use
dt~<pkg> --global
). For example:typings install dt~angular-component-router --global --save
- If you want to install from DefinitelyTyped, be explicit (use
- See the release notes for more information!
# Install Typings CLI utility.
npm install typings --global
# Search for definitions.
typings search tape
# Find an available definition (by name).
typings search --name react
# If you use the package as a module:
# Install non-global typings (defaults to "npm" source, configurable through `defaultSource` in `.typingsrc`).
typings install debug --save
# If you use the package through script tag, or
# it is part of the environment, or
# the non-global typings is not yet available:
typings install dt~mocha --global --save
# Install typings from particular registry.
typings install env~atom --global --save
typings install npm~bluebird --save
# Use `typings/index.d.ts` (in `tsconfig.json` or as a `///` reference).
cat typings/index.d.ts
Typings is the simple way to manage and install TypeScript definitions. It uses typings.json
, which can resolve to the Typings Registry, GitHub, NPM, Bower, HTTP and local files. Packages can use type definitions from various sources and different versions, knowing they will never conflict for users.
typings install debug --save
The public registry is maintained by the community, and is used to resolve official type definitions for JavaScript packages.
npm
- dependencies from NPMgithub
- dependencies directly from GitHub (E.g. Duo, JSPM)bower
- dependencies from Bowercommon
- "standard" libraries without a known "source"shared
- shared library functionalitylib
- shared environment functionality (mirror ofshared
) (--global
)env
- environments (E.g.atom
,electron
) (--global
)global
- global (window.<var>
) libraries (--global
)dt
- typings from DefinitelyTyped (usually--global
)
# Installation
# Fork this repo (https://github.com/typings/typings)
# Clone the fork (E.g. `https://github.com/<your_username>/typings.git`)
cd typings
# Install modules
npm install
# Build
npm run build
# Test
npm run test
MIT