Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
The .d.ts manager
.d.ts is TypeScript definition file. DefinitelyTyped!
$ npm install -g dtsm
dtsm depends on Node.js, npm and git command. please install git client.
# fetch from remote repository
$ dtsm fetch
fetching...
fetching https://github.com/DefinitelyTyped/DefinitelyTyped.git
# search .d.ts
$ dtsm search atom
Search results.
atom/atom.d.ts
dojo/dojox.atom.d.ts
# install .d.ts
$ dtsm install atom
atom/atom.d.ts #be0b6b
├── q/Q.d.ts
├── jquery/jquery.d.ts
├─┬ space-pen/space-pen.d.ts
│ └── jquery/jquery.d.ts
├─┬ emissary/emissary.d.ts
│ └── mixto/mixto.d.ts
├─┬ pathwatcher/pathwatcher.d.ts
│ ├── node/node.d.ts
│ └── q/Q.d.ts
├─┬ text-buffer/text-buffer.d.ts
│ ├─┬ emissary/emissary.d.ts
│ │ └── mixto/mixto.d.ts
│ └── q/Q.d.ts
└─┬ status-bar/status-bar.d.ts
├─┬ space-pen/space-pen.d.ts
│ └── jquery/jquery.d.ts
└─┬ text-buffer/text-buffer.d.ts
├─┬ emissary/emissary.d.ts
│ └── mixto/mixto.d.ts
└── q/Q.d.ts
$ tree typings
typings
├── atom
│ └── atom.d.ts
├── emissary
│ └── emissary.d.ts
├── jquery
│ └── jquery.d.ts
├── mixto
│ └── mixto.d.ts
├── node
│ └── node.d.ts
├── pathwatcher
│ └── pathwatcher.d.ts
├── q
│ └── Q.d.ts
├── space-pen
│ └── space-pen.d.ts
├── status-bar
│ └── status-bar.d.ts
└── text-buffer
└── text-buffer.d.ts
10 directories, 10 files
# create dtsm.json and save dependencies
$ dtsm init
write to dtsm.json
{
"repos": [
{
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"ref": "master"
}
],
"path": "typings",
"bundle": "typings/bundle.d.ts",
"dependencies": {}
}
$ dtsm install --save atom
atom/atom.d.ts #be0b6b
├── q/Q.d.ts
├── jquery/jquery.d.ts
├─┬ space-pen/space-pen.d.ts
│ └── jquery/jquery.d.ts
├─┬ emissary/emissary.d.ts
│ └── mixto/mixto.d.ts
├─┬ pathwatcher/pathwatcher.d.ts
│ ├── node/node.d.ts
│ └── q/Q.d.ts
├─┬ text-buffer/text-buffer.d.ts
│ ├─┬ emissary/emissary.d.ts
│ │ └── mixto/mixto.d.ts
│ └── q/Q.d.ts
└─┬ status-bar/status-bar.d.ts
├─┬ space-pen/space-pen.d.ts
│ └── jquery/jquery.d.ts
└─┬ text-buffer/text-buffer.d.ts
├─┬ emissary/emissary.d.ts
│ └── mixto/mixto.d.ts
└── q/Q.d.ts
$ cat dtsm.json
{
"repos": [
{
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"ref": "master"
}
],
"path": "typings",
"bundle": "typings/bundle.d.ts",
"dependencies": {
"atom/atom.d.ts": {
"ref": "be0b6b394f77a59e192ad7cfec18078706e44db5"
}
}
}
$ rm -rf typings/
$ dtsm install
atom/atom.d.ts #be0b6b
├── q/Q.d.ts
├── jquery/jquery.d.ts
├─┬ space-pen/space-pen.d.ts
│ └── jquery/jquery.d.ts
├─┬ emissary/emissary.d.ts
│ └── mixto/mixto.d.ts
├─┬ pathwatcher/pathwatcher.d.ts
│ ├── node/node.d.ts
│ └── q/Q.d.ts
├─┬ text-buffer/text-buffer.d.ts
│ ├─┬ emissary/emissary.d.ts
│ │ └── mixto/mixto.d.ts
│ └── q/Q.d.ts
└─┬ status-bar/status-bar.d.ts
├─┬ space-pen/space-pen.d.ts
│ └── jquery/jquery.d.ts
└─┬ text-buffer/text-buffer.d.ts
├─┬ emissary/emissary.d.ts
│ └── mixto/mixto.d.ts
└── q/Q.d.ts
$ ls -la | grep typings
drwxr-xr-x 13 vvakame wheel 442 3 27 00:31 typings
$ dtsm update --save
atom/atom.d.ts #0c2ee8
├── q/Q.d.ts
├── jquery/jquery.d.ts
├─┬ space-pen/space-pen.d.ts
│ └── jquery/jquery.d.ts
├─┬ emissary/emissary.d.ts
│ └── mixto/mixto.d.ts
├─┬ pathwatcher/pathwatcher.d.ts
│ ├── node/node.d.ts
│ └── q/Q.d.ts
├─┬ text-buffer/text-buffer.d.ts
│ ├─┬ emissary/emissary.d.ts
│ │ └── mixto/mixto.d.ts
│ └── q/Q.d.ts
└─┬ status-bar/status-bar.d.ts
├─┬ space-pen/space-pen.d.ts
│ └── jquery/jquery.d.ts
└─┬ text-buffer/text-buffer.d.ts
├─┬ emissary/emissary.d.ts
│ └── mixto/mixto.d.ts
└── q/Q.d.ts
# search for another repository
$ dtsm --remote https://github.com/vvakame/gapidts.git search bigquery
Search results.
test/valid/bigquery-v2-browser.d.ts
test/valid/bigquery-v2-nodejs.d.ts
$ cat dtsm.json
{
"repos": [
{
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"ref": "master"
},
{
"url": "https://github.com/vvakame/gapidts.git",
"ref": "master"
}
],
"path": "typings",
"bundle": "typings/bundle.d.ts",
"dependencies": {
"jquery/jquery.d.ts": {
"ref": "0605ebbdbdd8183c70b4a14e1e34ecb3f2b446bf"
},
"gapidts/bigquery-v2-browser.d.ts": {
"repo": "https://github.com/vvakame/gapidts.git",
"ref": "4edbcca555936a931407d667f8687f175ecbd5ed",
"path": "test/valid/bigquery-v2-browser.d.ts"
}
}
}
$ dtsm install
jquery/jquery.d.ts DefinitelyTyped/DefinitelyTyped#0605eb
gapidts/bigquery-v2-browser.d.ts vvakame/gapidts#4edbcc
└── gapidts/googleapis-browser-common.d.ts
If you use peco, you can install .d.ts file interactive.
$ dtsm search -i
$ dtsm install -i
If other package manager's dependencies have a TypeScript definition files, dtsm can find it and add to bundle.d.ts.
$ cat package.json
{
"name": "dtsm-sample",
"version": "0.0.1",
"dependencies": {
"commandpost": "0.1.1"
}
}
$ dtsm link --save
from npm dependencies
└─┬ commandpost
└── node_modules/commandpost/commandpost.d.ts
If dtsm.json
has link
property, dtsm install
exec link
sub command implicitly.
$ cat package.json
{
"name": "dtsm-sample",
"version": "0.0.1",
"dependencies": {
"commandpost": "0.1.1"
}
}
$ cat dtsm.json
{
"repos": [
{
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"ref": "master"
}
],
"path": "typings",
"bundle": "typings/bundle.d.ts",
"link": {
"npm": {
"include": true
},
"bower": {
"include": true
}
},
"dependencies": {}
}
$ dtsm install
install
from npm dependencies
└─┬ commandpost
└── node_modules/commandpost/commandpost.d.ts
See CHANGELOG
This package's author vvakame is not native english speaker. My first language is Japanese. If you are native english speaker. I wish received a pull request for document and anything.
FAQs
TypeScript definition file (.d.ts) manager
We found that dtsm demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.