steep icon indicating copy to clipboard operation
steep copied to clipboard

About external libraries without type definitions

Open cperezabo opened this issue 2 years ago • 2 comments

Hi folks.

It happens to me that no external gem I need comes with type definitions (Mongo, Mongoid, Roda, etc).

I don't know if I am missing something but, should I write my own definitions of every external gem?

In such case, is there any definitions library where we can put those definitions so other can improve them like it happens with DefinitelyTyped for TypeScript?

At the moment I had to stop using Steep because I don't know how to deal with the missing definitions, which in my case are absolutely all my project dependencies.

cperezabo avatar Dec 09 '23 22:12 cperezabo

Hi!

Did you see https://github.com/ruby/gem_rbs_collection? It's a central repository for community written RBS definitions. (But, unfortunately, I couldn't find type definitions of Mongo, Mongoid, and Roda...)

Here are two general advices for gems without type definition.

  1. You can write your own type definitions that is essential for your application
  2. You can push the type definition to gem_rbs_collection repository so that someone else can use the definition

soutaro avatar Dec 11 '23 01:12 soutaro

Hi, yes, I found that repository after posting this issue. 😅 Well, it looks like there is no easy way out and we'll need volunteers.

CC @stormwatch

cperezabo avatar Dec 11 '23 13:12 cperezabo