Import type definitions with `rbs prototype runtime`
pocke opened this issue · comments
Now we have only a few type definitions.
So I think it is a good idea to import type definitions with rbs prototype runtime
.
I tried generating rbs files for Active Record, and got the following rbs.
https://gist.github.com/pocke/2ed43fdbc11fa0df72d098a65127fea4
But we still have several problems to merge the rbs to this project.
- The RBS is generated with Rails with the master branch because it needs several patches.
- So we need to backport the patches to v6 and re-generate the RBS.
- We already have a few types under
assets/sig/
directory, so we need to merge them. - The generated RBS is not tested. I just generated and did nothing else. So it probably doesn't work well.
- It only contains Active Record, but we need other libraries such as Active Support.
- But we can introduce the generated rbs step by step.
I haven't tried yet, but I guess rbs prototype rb
is also useful.
Maybe we can combine rbs prototype rb
and rbs prototype runtime
.
almost done