-
Notifications
You must be signed in to change notification settings - Fork 52
Search DefinitelyTyped _and_ NPM #30
Comments
You might be right, but... consider: If a package ships its own types, why would someone be searching for types for it, as it already has them? 🤔 |
@weswigham Because I'm looking for a module that does X, and I'd like to find one that has type declarations. The old |
Hmmm, I guess if you're using typesearch as a kind of psuedo-npm-search that's reasonable. |
This would be potentially solved by some implementation of #22 (along with the addition of the types information to the npm search index by @orta in algolia/npm-search#346). |
I put together a CLI tool based on @orta's Algolia integration: dtsearch
I think it works pretty well in practice. TypeSearch might want to consider a similar approach. |
fyi the link to pika.dev is outdated, search is now here: https://www.pika.dev/search |
So far as I can tell, TypeSearch only searches packages whose types are defined in DefinitelyTyped. But it's preferable if a package defines and distributes its own types (so that the versions always match).
It would be better if TypeSearch were able to find these packages. For instance, if I type
react-mapbox-gl
on https://microsoft.github.io/TypeSearch/, nothing comes up, even though that package distributes TypeScript type declarations.There are NPM indices which can do this sort of search, for example:
https://www.pikapkg.com/packages/?q=has:types
or https://www.pikapkg.com/packages/?q=react-mapbox-gl
The arrow indicates that
package.json
for that module has atypes
property. cc @FredKSchottThe text was updated successfully, but these errors were encountered: