Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
TSD is a TypeScript definition file package manager. let you easily download and install definition files to use in TypeScript projects.
To view online package search go to http://www.tsdpm.com/
To view how to use TSD with NuGet Console go to Using TSD with Visual Studio Nuget Console
TSD is installed using node and npm. To install TSD use:
npm install tsd -g
Your best friend at this stage is probably
tsd -h
.
To view all repository files use:
tsd all
This will print all file definitions available on repository. To install some file on local project you must use install
command followed by a lib name:
tsd install node
This will create by default a folder named d.ts
(if it doesn't exists) and will download the file definition to this folder.
You can define your own custom folder to store definition files with the command:
tsd ncfg
This will create a file named tsd-config.json
on current folder with the following content:
{
"localPath": "ts-definitions",
"repositoryType": "1",
"uri": "https://github.com/Diullei/tsd/raw/master/deploy/repository.json"
}
0
to local folder or 1
to url.Some definition files have dependencies of another files like socket.io
that depends of node
. To install dependencies you can use tsd install
command followed by a list of libs to install.
Example:
tsd install socket.io node express
This will install express, socket.io and node definitions.
You can use install*
command to allow TSD tool to automatically map and install all necessary dependencies. If you use install* sochet.io
this will install sochet.io
and node
because sochet.io
has node
mapped as a dependency. If you use the command:
tsd install* knockback
TSD will install knockback
, knockout
and backbone
definition.
You can always use tsd update
command to verify if your local libs are updated.
To make a search for any file you must use search
command.
Example:
tsd search backbone
TSD get the file definitions from DefinitelyTyped project. You can view the repository references inside repository.json file (I'm working to add some anothers). If you want to contribute please make a fork from tsd repo, change the repository.json and make a pull request.
This file is updated constantly.
You can use TSD with Visual Studio NuGet Console. NuGet Console is a PowerShell Console and can normally call any application on Windows PATH. For view how to use TSD I suggest the following steps:
I will create an application named
TestApp
Goto TestApp root folder. Enter the cd .\TestApp
command on NuGet Console.
Create a TSD config file. On NuGet Console use the command: tsd ncfg
.
tsd-config.json
on your app root folder. To include this file on your application go to Vidual Studio Solution Explorer and select Show All Files
.This will show tsd-config.json
file on Solution Explorer.
Take right click on tsd-config.json
file and select Include In Project
. Now you can edit this file on visual Studio. See configuration section.
Try install jquery
definition file using tsd install jquery
on NuGet Console and go to Vidual Studio Solution Explorer and select Show All Files
(if it is not enabled) to view ts-definition
folder with jquery
definition file. Include this folder in project.
You can test other TSD commands like
tsd all
See usage section.
TSD is distributed under the MIT license. See license file here or below:
Copyright (c) 2012 by Diullei Gomes
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
Check TypeScript type definitions
The npm package tsd receives a total of 134,465 weekly downloads. As such, tsd popularity was classified as popular.
We found that tsd demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.