Typescript: Not all d.ts files in DefinitelyTyped are available through @types in NPM

Created on 20 Jul 2016  ·  14Comments  ·  Source: microsoft/TypeScript

TypeScript Version: 2.0 beta
Code

// A *self-contained* demonstration of the problem follows...

npm install --save  @types/elasticsearch

Expected behavior:
successfully install elasticsearch.d.ts

Actual behavior:
npm ERR! Darwin 15.5.0
npm ERR! argv "/usr/local/Cellar/node/6.2.2/bin/node" "/usr/local/bin/npm" "install" "--save" "@types/elasticsearch"
npm ERR! node v6.2.2
npm ERR! npm v3.9.5
npm ERR! code E404

npm ERR! 404 Not found : @types/elasticsearch
npm ERR! 404
npm ERR! 404 '@types/elasticsearch' is not in the npm registry.

more info
https://www.npmjs.com/package/@types/elasticsearch is not present in npm, but yes here:
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/elasticsearch/elasticsearch.d.ts

I was expecting to be in sync.

Thanks!

@types Bug Fixed

All 14 comments

We are currently setting up an automated task to do the publishing. but until this happens we do these manually.

@mhegazy do you know if VS Code already supports @types/* definitions?

@NekR it does, if you provide your own installation of TS 2.0.

I see, thanks.

Hmm.. it doesn't work for me. I use VS Code nightly and added to .vscode/settings.json

// Place your settings in this file to overwrite default and user settings.
{
  "typescript.tsdk": "/Users/xxx/Projects/yyy/node_modules/typescript/lib"
}

... but it still doesn't see react definitions. Both react and @types/react are installed.

@NekR reloaded window?

@niieani yeah. It works for electron, but doesn't for react by some reason. I'll check again later.

What's the timeline on this? (Just curious)

I'm working on a merge from the DT master to the 2.0 branch (ETA end of week) and then we'll be doing a fresh publish. After that it should be automated

Any new status here?
If the automated process still is a few days away, can someone help me publish semantic-ui from DefinitelyTyped to @types? Or can I do this myself?

elastic search definitions should be available under @types/[email protected] now.

For other changes, we are actively merging master into types-2.0, at least once a week. you can send PRs directly to the types-2.0 branch if faster update is needed.

I am still confused by this.

https://microsoft.github.io/TypeSearch/ shows that lwip is available, per https://www.npmjs.com/package/@types/lwip.

But even so, if I run npm install @types/lwip.d.ts it returns:

npm ERR! 404 Not Found: @types/lwip.d.ts@latest

How do we know if the packages will work, short of trying each on individually?

@DaveVoyles it appears to be a local issue to you:

$ npm install @types/lwip
test-app0.1.0 /some/path/test-app
└── @types/[email protected] 

just noticed... it is npm install @types/lwip

Was this page helpful?
0 / 5 - 0 ratings