Skip to content

[🚀 Feature]: Add rbs files to Ruby #10943

Open
@titusfortner

Description

@titusfortner

Feature and motivation

We're adding Type hints to Python & looking at TypeScript for JS, the equivalent for Ruby is to add rbs files.

Ruby Selenium does a lot of meta-programming which makes it more difficult to use with an IDE like RubyMine. Adding rbs files, *should make this much easier.

Usage example

I think they'll look like this?

module Selenium
  module WebDriver
    module Edge
      class Options < Selenium::WebDriver::Chrome::Options
        KEY:String
        BROWSER:String

        def enable_logging: (browser_options: Hash) -> Hash

        def binary_path: () -> String
      end
    end
  end
end

and then RubyMine and other IDEs will be able to do type hints, etc

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-rbRuby BindingsI-enhancementSomething could be betterR-help wantedIssues looking for contributions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions