Code Monkey home page Code Monkey logo

typings's Introduction

Typings

NPM version NPM downloads Build status Test coverage Gitter

The manager for TypeScript definitions.

Quick Start

# Install Typings CLI utility.
npm install typings --global

# Search for definitions.
typings search tape

# Find ambient definitions (includes DefinitelyTyped in lookup due to --ambient flag).
typings search react --ambient

# Install ambient typings (and persist selection in `typings.json`).
typings install react --ambient --save

# Use `main.d.ts` (in `tsconfig.json` or as a `///` reference).
cat typings/main.d.ts

Features

  • Package manager parity
    • Familiar commands like init, install, rm and ls
    • Support for installation of type definitions based on the true version number of the package you are using. (Rather than on a SHA hash as with TSD.) Read more.
  • Installation from GitHub, BitBucket, NPM dependencies, Bower dependencies and HTTP(s)
    • If a project uses Typings, you can install it locally - try typings install npm:popsicle
  • Simple typings configuration file
    • Persist dependencies in typings.json and everyone on the project can replicate it
  • Name-spaced dependencies (not for ambient dependencies - those are always global)
    • TypeScript definitions will be name-spaced and contained from leaky type information

Usage

Typings is the simple way to manage and install TypeScript definitions. It uses typings.json, which can resolve to GitHub, NPM, Bower, HTTP and local files. Packages can use type definitions from various sources and different versions, and know they will never cause a conflict for users.

typings install debug --save

A public registry is maintained by the community, and is used to resolve official type definitions for JavaScript packages.

Read More

Configuration

Typings supports configuration using rc. The config options can be set using CLI arguments, environment variables prefixed with typings_ or a .typingsrc file.

  • proxy A HTTP(s) proxy URI for outgoing requests
  • httpProxy The proxy to use for HTTP requests (default: process.env.HTTP_PROXY)
  • httpsProxy The proxy to use for HTTPS requests (default: process.env.HTTPS_PROXY)
  • noProxy A string of space-separated hosts to not proxy (default: process.env.NO_PROXY)
  • rejectUnauthorized Reject invalid SSL certificates (default: true)
  • ca A string or array of strings of trusted certificates in PEM format
  • key Private key to use for SSL (default: null)
  • cert Public x509 certificate to use (default: null)
  • userAgent Set the User-Agent for HTTP requests (default: typings/{typingsVersion} node/{nodeVersion} {platform} {arch})
  • githubToken Set your GitHub for resolving github: locations
  • registryURL Override the registry URL
  • defaultSource Override the default installation source (E.g. when doing typings install debug) (default: npm)
  • defaultAmbientSource Override the default ambient installation source (E.g. when doing typings install node -A) (default: dt)

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

basarat avatar blakeembrey avatar glen-84 avatar greenkeeperio-bot avatar hiroppy avatar johnnyreilly avatar paked avatar sweetchuck avatar unional avatar

Watchers

 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.