123456789_123456789_123456789_123456789_123456789_

How to use TypeProf for IDE

First, try it with an already-configured repository!

  1. rbenv install 3.1.0
  2. git clone https://github.com/mame/rbswiki
  3. cd rbswiki && bundle install
  4. rbs collection install
  5. install VSCode extension for TypeProf to your VSCode
  6. open the rbswiki folder by VSCode
  7. open lib/rbswiki/wiki.rb

If everything goes well, you will see guessed signatures for each method:

Screenshot

Troubleshooting

$ ruby -v
ruby 3.1p0 (2021-12-25 revision fb4df44d16) [x86_64-linux]
$ bundle exec typeprof --version
typeprof 0.21
$ bundle exec typeprof lib/rbswiki/wiki.rb
# TypeProf 0.21.2

# Classes
module RBSWiki
  class Wiki
    @content: Hash[String, String]
#...

Log of TypeProf for IDE

How to configure TypeProf for your code

  1. Write gem "typeprof" to your Gemfile, and run bundle install
  2. Write rbs_collection.yaml, and run rbs collection install
  3. Test if TypeProf works well by running bundle exec typeprof your_code.rb
  4. Open your repository with vscode

Troubleshooting

Protips, limitation, unimplemented features, ...

TypeProf for IDE is extremely preliminary! Please give it a try with a warm heart...

How to develop TypeProf for IDE

See the [TypeProf VSCode document]).

See also