GithubHelp home page GithubHelp logo

registry's Introduction

Typings Registry

The registry of type definitions for TypeScript.

Contributing

As package author

You can create typings and distribute them with your NPM package. Check out how we can collaborate (if you need help) in this issue. The TypeScript team gives some additional help in their handbook, which entails creating a definition in external module format and linking to it from package.json. Feel free to ask questions!

Ask the author

You can open an issue in the package's repository and ask if they'd be interested in providing a TypeScript definition for their users. If they are, you can link them to this issue on collaborating, in case they need a hand getting started.

Contribute yourself

  1. Fork the registry and run npm install
  2. Write a typings definition and upload to GitHub - here's an example using NPM's debug package
  3. Use semver to specify the minimum version the typings are valid for in the registry - here's debug again
  4. Commit and run npm test to check that the registry is valid, make a pull request
  5. Once the pull request is merged, it will be used as the canonical reference - typings install debug

Links

  • Typings requests are labelled with typings request in the issues
  • If you'd like to help review PRs to the registry, see #70 to help out
  • If you're wondering how to write tests for your typings, see #150
  • If you'd like to help collaborate on types, see #480 so we can collaborate
  • If you'd like to lint your definitions, try tslint-config-typings

Creating Typings

  • Initialize a new repository (usually typed-<package name> to differentiate from your other projects)
  • Use generator-typings to generate the project, or manually:
    • Create a typings.json file, set main (and other valid options)
    • Make sure there's a license with your work
    • A README can help explain what people are looking at when they land on your repo

Structure

The registry uses subdirectories to denote "sources". These sources are essentially mappings to package managers, and contain either ambient or external module typings (depending on the "source").

/<source>/<name>.json

Where "source" is one of:

  • npm for NPM dependencies (external)
  • github for Duo, JSPM, etc. that use GitHub as the registry (external)
  • bower for Bower dependencies (external)
  • common for "standard" JS libraries without a "source" (external)
  • shared for shared library functionality (external)
  • lib for shared environment functionality (global)
  • env for programming environment typings (global)
  • global for global libraries (global)

And "name" is the name of the package from the source. For GitHub and scoped NPM packages, it's valid to make a folder such as @example/entry.json. The schema for package files is described using JSON schema in schema.json.

Questions?

For typings issues, questions or general help, you can always open an issue in the discussions repo. To add an entry to the registry, please open a pull request with the change.

registry's People

Contributors

blakeembrey avatar unional avatar felixfbecker avatar louy avatar somaticit avatar fank avatar effervescentia avatar caselit avatar goenning avatar asvetliakov avatar j-oliveras avatar rapropos avatar zaytsevvla avatar tkqubo avatar jkeylu avatar samvloeberghs avatar jgoz avatar jessezhang91 avatar demurgos avatar adaball avatar giedriusgrabauskas avatar joewashear007 avatar lukephills avatar patrickjs avatar greenkeeperio-bot avatar protectator avatar nickzelei avatar mxl avatar bossqone avatar jupemara avatar

Watchers

James Cloos avatar  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.