Add initial RBS support with Steep and TypeProf

This commit is contained in:
Wilson Silva
2023-01-22 17:42:59 +07:00
parent 59e058d511
commit 8f6a7547f5
19 changed files with 290 additions and 1 deletions

View File

@@ -27,7 +27,6 @@ All examples below assume that the gem has been required.
require 'nostr'
```
### Generating a keypair
```ruby
@@ -221,6 +220,13 @@ rake yard:junk # Check the junk in your YARD Documentation
rake yardstick_measure # Measure docs in lib/**/*.rb with yardstick
```
### Type checking
This gem leverages [RBS](https://github.com/ruby/rbs), a language to describe the structure of Ruby programs. It is
used to provide type checking and autocompletion in your editor. Run `bundle exec typeprof FILENAME` to generate
an RBS definition for the given Ruby file. And validate all definitions using [Steep](https://github.com/soutaro/steep)
with the command `bundle exec steep check`.
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/wilsonsilva/nostr.