Giter Club home page Giter Club logo

typings's Introduction

Typings

NPM version NPM downloads Build status Gitter

The TypeScript Definition Manager.

Updating From 0.x to 1.0?

  • rm -rf typings/
    • The directory contains "main", by default
    • Update tsconfig.json to match (the bundle file is typings/index.d.ts)
  • Want main and/or browser output again? See where the typings install in the FAQ
  • Usages of ambient are now global
    • That means in typings.json any ambientDependencies should be renamed globalDependencies and any ambientDevDependencies should be renamed globalDevDependencies.
    • It also means --ambient is now --global
  • 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
  • See the release notes for more information!

Quick Start

# 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

Usage

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.

Read More

Sources

  • npm - dependencies from NPM
  • github - dependencies directly from GitHub (E.g. Duo, JSPM)
  • bower - dependencies from Bower
  • common - "standard" libraries without a known "source"
  • shared - shared library functionality
  • lib - shared environment functionality (mirror of shared) (--global)
  • env - environments (E.g. atom, electron) (--global)
  • global - global (window.<var>) libraries (--global)
  • dt - typings from DefinitelyTyped (usually --global)

Contributing

# 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

License

MIT

typings's People

Contributors

blakeembrey avatar unional avatar johnnyreilly avatar greenkeeperio-bot avatar basarat avatar olsondev avatar hiroppy avatar xeoneux avatar santee avatar sweetchuck avatar glen-84 avatar paked avatar josephfrazier avatar remojansen avatar akapest avatar

Watchers

James Cloos avatar Xiahl1990 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.