From 8dac3a4eaeb0d19c17138bac936bcccdc92d18f2 Mon Sep 17 00:00:00 2001 From: Kaan Ozkan Date: Fri, 22 Nov 2024 15:03:46 -0500 Subject: [PATCH 1/6] Add ruby-lsp and ruby-lsp-rails to Gemfile for add-on development --- Gemfile | 2 ++ Gemfile.lock | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/Gemfile b/Gemfile index e92644b67..eb4a5c6b1 100644 --- a/Gemfile +++ b/Gemfile @@ -15,6 +15,8 @@ gem "irb" gem "rubocop-shopify" gem "rubocop-sorbet", ">= 0.4.1" gem "rubocop-rspec" # useful even though we use minitest/spec +gem "ruby-lsp", ">= 0.22.1" +gem "ruby-lsp-rails", ">= 0.3.18" group :deployment, :development do gem "rake" diff --git a/Gemfile.lock b/Gemfile.lock index b3447c766..7ad925e3b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -276,6 +276,8 @@ GEM rbi (0.2.1) prism (~> 1.0) sorbet-runtime (>= 0.5.9204) + rbs (3.6.1) + logger rdoc (6.7.0) psych (>= 4.0.0) redis (5.0.8) @@ -304,6 +306,13 @@ GEM rubocop (~> 1.51) rubocop-sorbet (0.8.7) rubocop (>= 1) + ruby-lsp (0.22.1) + language_server-protocol (~> 3.17.0) + prism (>= 1.2, < 2.0) + rbs (>= 3, < 4) + sorbet-runtime (>= 0.5.10782) + ruby-lsp-rails (0.3.27) + ruby-lsp (>= 0.22.0, < 0.23.0) ruby-progressbar (1.13.0) securerandom (0.3.1) shopify-money (3.0.0) @@ -387,6 +396,8 @@ DEPENDENCIES rubocop-rspec rubocop-shopify rubocop-sorbet (>= 0.4.1) + ruby-lsp (>= 0.22.1) + ruby-lsp-rails (>= 0.3.18) shopify-money sidekiq smart_properties From 3ee179ca83d4df5b19a1319b1bdbd4bd4d372567 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Thu, 3 Oct 2024 11:08:34 -0400 Subject: [PATCH 2/6] Add requires to generate ruby-lsp related RBIs --- sorbet/tapioca/require.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sorbet/tapioca/require.rb b/sorbet/tapioca/require.rb index 63543b536..f6370f731 100644 --- a/sorbet/tapioca/require.rb +++ b/sorbet/tapioca/require.rb @@ -10,3 +10,9 @@ require "rake/testtask" require "rubocop/rake_task" require "zeitwerk" + +# Add-on related requires. These are not required by default, so we must list them in order to generate proper RBIs +require "ruby_lsp/internal" +require "ruby_lsp/test_helper" +require "ruby_lsp/ruby_lsp_rails/addon" +require "rbs" From 876469a81dd88727e8f7ceb65662d2a8977bad1a Mon Sep 17 00:00:00 2001 From: Kaan Ozkan Date: Fri, 22 Nov 2024 15:04:21 -0500 Subject: [PATCH 3/6] Generate gem RBIs --- sorbet/rbi/gems/rbs@3.6.1.rbi | 6857 +++++++++++++++++++++ sorbet/rbi/gems/ruby-lsp-rails@0.3.27.rbi | 684 ++ sorbet/rbi/gems/ruby-lsp@0.22.1.rbi | 6117 ++++++++++++++++++ 3 files changed, 13658 insertions(+) create mode 100644 sorbet/rbi/gems/rbs@3.6.1.rbi create mode 100644 sorbet/rbi/gems/ruby-lsp-rails@0.3.27.rbi create mode 100644 sorbet/rbi/gems/ruby-lsp@0.22.1.rbi diff --git a/sorbet/rbi/gems/rbs@3.6.1.rbi b/sorbet/rbi/gems/rbs@3.6.1.rbi new file mode 100644 index 000000000..29f1291be --- /dev/null +++ b/sorbet/rbi/gems/rbs@3.6.1.rbi @@ -0,0 +1,6857 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rbs` gem. +# Please instead update this file by running `bin/tapioca gem rbs`. + + +# source://rbs/lib/rbs/namespace.rb#120 +module Kernel + # source://rbs/lib/rbs/namespace.rb#121 + def Namespace(name); end + + # source://rbs/lib/rbs/type_name.rb#93 + def TypeName(string); end +end + +# source://rbs/lib/rbs/version.rb#3 +module RBS + class << self + # source://rbs/lib/rbs.rb#68 + def logger; end + + # Returns the value of attribute logger_level. + # + # source://rbs/lib/rbs.rb#65 + def logger_level; end + + # source://rbs/lib/rbs.rb#77 + def logger_level=(level); end + + # Returns the value of attribute logger_output. + # + # source://rbs/lib/rbs.rb#66 + def logger_output; end + + # source://rbs/lib/rbs.rb#72 + def logger_output=(val); end + + # source://rbs/lib/rbs.rb#82 + def print_warning; end + end +end + +# source://rbs/lib/rbs/ast/type_param.rb#4 +module RBS::AST; end + +# source://rbs/lib/rbs/ast/annotation.rb#5 +class RBS::AST::Annotation + # @return [Annotation] a new instance of Annotation + # + # source://rbs/lib/rbs/ast/annotation.rb#9 + def initialize(string:, location:); end + + # source://rbs/lib/rbs/ast/annotation.rb#14 + def ==(other); end + + # source://rbs/lib/rbs/ast/annotation.rb#14 + def eql?(other); end + + # source://rbs/lib/rbs/ast/annotation.rb#20 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/ast/annotation.rb#7 + def location; end + + # Returns the value of attribute string. + # + # source://rbs/lib/rbs/ast/annotation.rb#6 + def string; end + + # source://rbs/lib/rbs/ast/annotation.rb#24 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs/lib/rbs/ast/comment.rb#5 +class RBS::AST::Comment + # @return [Comment] a new instance of Comment + # + # source://rbs/lib/rbs/ast/comment.rb#9 + def initialize(string:, location:); end + + # source://rbs/lib/rbs/ast/comment.rb#14 + def ==(other); end + + # source://rbs/lib/rbs/ast/comment.rb#14 + def eql?(other); end + + # source://rbs/lib/rbs/ast/comment.rb#20 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/ast/comment.rb#7 + def location; end + + # Returns the value of attribute string. + # + # source://rbs/lib/rbs/ast/comment.rb#6 + def string; end + + # source://rbs/lib/rbs/ast/comment.rb#24 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs/lib/rbs/ast/declarations.rb#5 +module RBS::AST::Declarations; end + +# source://rbs/lib/rbs/ast/declarations.rb#419 +class RBS::AST::Declarations::AliasDecl < ::RBS::AST::Declarations::Base + # @return [AliasDecl] a new instance of AliasDecl + # + # source://rbs/lib/rbs/ast/declarations.rb#422 + def initialize(new_name:, old_name:, location:, comment:); end + + # source://rbs/lib/rbs/ast/declarations.rb#429 + def ==(other); end + + # Returns the value of attribute comment. + # + # source://rbs/lib/rbs/ast/declarations.rb#420 + def comment; end + + # source://rbs/lib/rbs/ast/declarations.rb#429 + def eql?(other); end + + # source://rbs/lib/rbs/ast/declarations.rb#437 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/ast/declarations.rb#420 + def location; end + + # Returns the value of attribute new_name. + # + # source://rbs/lib/rbs/ast/declarations.rb#420 + def new_name; end + + # Returns the value of attribute old_name. + # + # source://rbs/lib/rbs/ast/declarations.rb#420 + def old_name; end +end + +# source://rbs/lib/rbs/ast/declarations.rb#6 +class RBS::AST::Declarations::Base; end + +# source://rbs/lib/rbs/ast/declarations.rb#55 +class RBS::AST::Declarations::Class < ::RBS::AST::Declarations::Base + include ::RBS::AST::Declarations::NestedDeclarationHelper + include ::RBS::AST::Declarations::MixinHelper + + # @return [Class] a new instance of Class + # + # source://rbs/lib/rbs/ast/declarations.rb#97 + def initialize(name:, type_params:, super_class:, members:, annotations:, location:, comment:); end + + # source://rbs/lib/rbs/ast/declarations.rb#119 + def ==(other); end + + # Returns the value of attribute annotations. + # + # source://rbs/lib/rbs/ast/declarations.rb#93 + def annotations; end + + # Returns the value of attribute comment. + # + # source://rbs/lib/rbs/ast/declarations.rb#95 + def comment; end + + # source://rbs/lib/rbs/ast/declarations.rb#119 + def eql?(other); end + + # source://rbs/lib/rbs/ast/declarations.rb#129 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/ast/declarations.rb#94 + def location; end + + # Returns the value of attribute members. + # + # source://rbs/lib/rbs/ast/declarations.rb#91 + def members; end + + # Returns the value of attribute name. + # + # source://rbs/lib/rbs/ast/declarations.rb#89 + def name; end + + # Returns the value of attribute super_class. + # + # source://rbs/lib/rbs/ast/declarations.rb#92 + def super_class; end + + # source://rbs/lib/rbs/ast/declarations.rb#133 + def to_json(state = T.unsafe(nil)); end + + # Returns the value of attribute type_params. + # + # source://rbs/lib/rbs/ast/declarations.rb#90 + def type_params; end + + # source://rbs/lib/rbs/ast/declarations.rb#107 + def update(name: T.unsafe(nil), type_params: T.unsafe(nil), super_class: T.unsafe(nil), members: T.unsafe(nil), annotations: T.unsafe(nil), location: T.unsafe(nil), comment: T.unsafe(nil)); end +end + +# source://rbs/lib/rbs/ast/declarations.rb#56 +class RBS::AST::Declarations::Class::Super + # @return [Super] a new instance of Super + # + # source://rbs/lib/rbs/ast/declarations.rb#61 + def initialize(name:, args:, location:); end + + # source://rbs/lib/rbs/ast/declarations.rb#67 + def ==(other); end + + # Returns the value of attribute args. + # + # source://rbs/lib/rbs/ast/declarations.rb#58 + def args; end + + # source://rbs/lib/rbs/ast/declarations.rb#67 + def eql?(other); end + + # source://rbs/lib/rbs/ast/declarations.rb#73 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/ast/declarations.rb#59 + def location; end + + # Returns the value of attribute name. + # + # source://rbs/lib/rbs/ast/declarations.rb#57 + def name; end + + # source://rbs/lib/rbs/ast/declarations.rb#77 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs/lib/rbs/ast/declarations.rb#442 +class RBS::AST::Declarations::ClassAlias < ::RBS::AST::Declarations::AliasDecl + # source://rbs/lib/rbs/ast/declarations.rb#443 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs/lib/rbs/ast/declarations.rb#347 +class RBS::AST::Declarations::Constant < ::RBS::AST::Declarations::Base + # @return [Constant] a new instance of Constant + # + # source://rbs/lib/rbs/ast/declarations.rb#353 + def initialize(name:, type:, location:, comment:); end + + # source://rbs/lib/rbs/ast/declarations.rb#360 + def ==(other); end + + # Returns the value of attribute comment. + # + # source://rbs/lib/rbs/ast/declarations.rb#351 + def comment; end + + # source://rbs/lib/rbs/ast/declarations.rb#360 + def eql?(other); end + + # source://rbs/lib/rbs/ast/declarations.rb#368 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/ast/declarations.rb#350 + def location; end + + # Returns the value of attribute name. + # + # source://rbs/lib/rbs/ast/declarations.rb#348 + def name; end + + # source://rbs/lib/rbs/ast/declarations.rb#372 + def to_json(state = T.unsafe(nil)); end + + # Returns the value of attribute type. + # + # source://rbs/lib/rbs/ast/declarations.rb#349 + def type; end +end + +# source://rbs/lib/rbs/ast/declarations.rb#383 +class RBS::AST::Declarations::Global < ::RBS::AST::Declarations::Base + # @return [Global] a new instance of Global + # + # source://rbs/lib/rbs/ast/declarations.rb#389 + def initialize(name:, type:, location:, comment:); end + + # source://rbs/lib/rbs/ast/declarations.rb#396 + def ==(other); end + + # Returns the value of attribute comment. + # + # source://rbs/lib/rbs/ast/declarations.rb#387 + def comment; end + + # source://rbs/lib/rbs/ast/declarations.rb#396 + def eql?(other); end + + # source://rbs/lib/rbs/ast/declarations.rb#404 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/ast/declarations.rb#386 + def location; end + + # Returns the value of attribute name. + # + # source://rbs/lib/rbs/ast/declarations.rb#384 + def name; end + + # source://rbs/lib/rbs/ast/declarations.rb#408 + def to_json(state = T.unsafe(nil)); end + + # Returns the value of attribute type. + # + # source://rbs/lib/rbs/ast/declarations.rb#385 + def type; end +end + +# source://rbs/lib/rbs/ast/declarations.rb#248 +class RBS::AST::Declarations::Interface < ::RBS::AST::Declarations::Base + include ::RBS::AST::Declarations::MixinHelper + + # @return [Interface] a new instance of Interface + # + # source://rbs/lib/rbs/ast/declarations.rb#258 + def initialize(name:, type_params:, members:, annotations:, location:, comment:); end + + # source://rbs/lib/rbs/ast/declarations.rb#278 + def ==(other); end + + # Returns the value of attribute annotations. + # + # source://rbs/lib/rbs/ast/declarations.rb#252 + def annotations; end + + # Returns the value of attribute comment. + # + # source://rbs/lib/rbs/ast/declarations.rb#254 + def comment; end + + # source://rbs/lib/rbs/ast/declarations.rb#278 + def eql?(other); end + + # source://rbs/lib/rbs/ast/declarations.rb#287 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/ast/declarations.rb#253 + def location; end + + # Returns the value of attribute members. + # + # source://rbs/lib/rbs/ast/declarations.rb#251 + def members; end + + # Returns the value of attribute name. + # + # source://rbs/lib/rbs/ast/declarations.rb#249 + def name; end + + # source://rbs/lib/rbs/ast/declarations.rb#291 + def to_json(state = T.unsafe(nil)); end + + # Returns the value of attribute type_params. + # + # source://rbs/lib/rbs/ast/declarations.rb#250 + def type_params; end + + # source://rbs/lib/rbs/ast/declarations.rb#267 + def update(name: T.unsafe(nil), type_params: T.unsafe(nil), members: T.unsafe(nil), annotations: T.unsafe(nil), location: T.unsafe(nil), comment: T.unsafe(nil)); end +end + +# source://rbs/lib/rbs/ast/declarations.rb#35 +module RBS::AST::Declarations::MixinHelper + # source://rbs/lib/rbs/ast/declarations.rb#36 + def each_mixin(&block); end +end + +# source://rbs/lib/rbs/ast/declarations.rb#147 +class RBS::AST::Declarations::Module < ::RBS::AST::Declarations::Base + include ::RBS::AST::Declarations::NestedDeclarationHelper + include ::RBS::AST::Declarations::MixinHelper + + # @return [Module] a new instance of Module + # + # source://rbs/lib/rbs/ast/declarations.rb#197 + def initialize(name:, type_params:, members:, self_types:, annotations:, location:, comment:); end + + # source://rbs/lib/rbs/ast/declarations.rb#220 + def ==(other); end + + # Returns the value of attribute annotations. + # + # source://rbs/lib/rbs/ast/declarations.rb#193 + def annotations; end + + # Returns the value of attribute comment. + # + # source://rbs/lib/rbs/ast/declarations.rb#195 + def comment; end + + # source://rbs/lib/rbs/ast/declarations.rb#220 + def eql?(other); end + + # source://rbs/lib/rbs/ast/declarations.rb#230 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/ast/declarations.rb#192 + def location; end + + # Returns the value of attribute members. + # + # source://rbs/lib/rbs/ast/declarations.rb#191 + def members; end + + # Returns the value of attribute name. + # + # source://rbs/lib/rbs/ast/declarations.rb#189 + def name; end + + # Returns the value of attribute self_types. + # + # source://rbs/lib/rbs/ast/declarations.rb#194 + def self_types; end + + # source://rbs/lib/rbs/ast/declarations.rb#234 + def to_json(state = T.unsafe(nil)); end + + # Returns the value of attribute type_params. + # + # source://rbs/lib/rbs/ast/declarations.rb#190 + def type_params; end + + # source://rbs/lib/rbs/ast/declarations.rb#207 + def update(name: T.unsafe(nil), type_params: T.unsafe(nil), members: T.unsafe(nil), self_types: T.unsafe(nil), annotations: T.unsafe(nil), location: T.unsafe(nil), comment: T.unsafe(nil)); end +end + +# source://rbs/lib/rbs/ast/declarations.rb#148 +class RBS::AST::Declarations::Module::Self + # @return [Self] a new instance of Self + # + # source://rbs/lib/rbs/ast/declarations.rb#153 + def initialize(name:, args:, location:); end + + # source://rbs/lib/rbs/ast/declarations.rb#159 + def ==(other); end + + # Returns the value of attribute args. + # + # source://rbs/lib/rbs/ast/declarations.rb#150 + def args; end + + # source://rbs/lib/rbs/ast/declarations.rb#159 + def eql?(other); end + + # source://rbs/lib/rbs/ast/declarations.rb#165 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/ast/declarations.rb#151 + def location; end + + # Returns the value of attribute name. + # + # source://rbs/lib/rbs/ast/declarations.rb#149 + def name; end + + # source://rbs/lib/rbs/ast/declarations.rb#169 + def to_json(state = T.unsafe(nil)); end + + # source://rbs/lib/rbs/ast/declarations.rb#177 + def to_s; end +end + +# source://rbs/lib/rbs/ast/declarations.rb#454 +class RBS::AST::Declarations::ModuleAlias < ::RBS::AST::Declarations::AliasDecl + # source://rbs/lib/rbs/ast/declarations.rb#455 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs/lib/rbs/ast/declarations.rb#9 +module RBS::AST::Declarations::NestedDeclarationHelper + # source://rbs/lib/rbs/ast/declarations.rb#22 + def each_decl; end + + # source://rbs/lib/rbs/ast/declarations.rb#10 + def each_member; end +end + +# source://rbs/lib/rbs/ast/declarations.rb#304 +class RBS::AST::Declarations::TypeAlias < ::RBS::AST::Declarations::Base + # @return [TypeAlias] a new instance of TypeAlias + # + # source://rbs/lib/rbs/ast/declarations.rb#312 + def initialize(name:, type_params:, type:, annotations:, location:, comment:); end + + # source://rbs/lib/rbs/ast/declarations.rb#321 + def ==(other); end + + # Returns the value of attribute annotations. + # + # source://rbs/lib/rbs/ast/declarations.rb#308 + def annotations; end + + # Returns the value of attribute comment. + # + # source://rbs/lib/rbs/ast/declarations.rb#310 + def comment; end + + # source://rbs/lib/rbs/ast/declarations.rb#321 + def eql?(other); end + + # source://rbs/lib/rbs/ast/declarations.rb#330 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/ast/declarations.rb#309 + def location; end + + # Returns the value of attribute name. + # + # source://rbs/lib/rbs/ast/declarations.rb#305 + def name; end + + # source://rbs/lib/rbs/ast/declarations.rb#334 + def to_json(state = T.unsafe(nil)); end + + # Returns the value of attribute type. + # + # source://rbs/lib/rbs/ast/declarations.rb#307 + def type; end + + # Returns the value of attribute type_params. + # + # source://rbs/lib/rbs/ast/declarations.rb#306 + def type_params; end +end + +# source://rbs/lib/rbs/ast/directives.rb#5 +module RBS::AST::Directives; end + +# source://rbs/lib/rbs/ast/directives.rb#6 +class RBS::AST::Directives::Base; end + +# source://rbs/lib/rbs/ast/directives.rb#9 +class RBS::AST::Directives::Use < ::RBS::AST::Directives::Base + # @return [Use] a new instance of Use + # + # source://rbs/lib/rbs/ast/directives.rb#31 + def initialize(clauses:, location:); end + + # Returns the value of attribute clauses. + # + # source://rbs/lib/rbs/ast/directives.rb#29 + def clauses; end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/ast/directives.rb#29 + def location; end +end + +# source://rbs/lib/rbs/ast/directives.rb#10 +class RBS::AST::Directives::Use::SingleClause + # @return [SingleClause] a new instance of SingleClause + # + # source://rbs/lib/rbs/ast/directives.rb#13 + def initialize(type_name:, new_name:, location:); end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/ast/directives.rb#11 + def location; end + + # Returns the value of attribute new_name. + # + # source://rbs/lib/rbs/ast/directives.rb#11 + def new_name; end + + # Returns the value of attribute type_name. + # + # source://rbs/lib/rbs/ast/directives.rb#11 + def type_name; end +end + +# source://rbs/lib/rbs/ast/directives.rb#20 +class RBS::AST::Directives::Use::WildcardClause + # @return [WildcardClause] a new instance of WildcardClause + # + # source://rbs/lib/rbs/ast/directives.rb#23 + def initialize(namespace:, location:); end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/ast/directives.rb#21 + def location; end + + # Returns the value of attribute namespace. + # + # source://rbs/lib/rbs/ast/directives.rb#21 + def namespace; end +end + +# source://rbs/lib/rbs/ast/members.rb#5 +module RBS::AST::Members; end + +# source://rbs/lib/rbs/ast/members.rb#397 +class RBS::AST::Members::Alias < ::RBS::AST::Members::Base + # @return [Alias] a new instance of Alias + # + # source://rbs/lib/rbs/ast/members.rb#405 + def initialize(new_name:, old_name:, kind:, annotations:, location:, comment:); end + + # source://rbs/lib/rbs/ast/members.rb#414 + def ==(other); end + + # Returns the value of attribute annotations. + # + # source://rbs/lib/rbs/ast/members.rb#401 + def annotations; end + + # Returns the value of attribute comment. + # + # source://rbs/lib/rbs/ast/members.rb#403 + def comment; end + + # source://rbs/lib/rbs/ast/members.rb#414 + def eql?(other); end + + # source://rbs/lib/rbs/ast/members.rb#423 + def hash; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/ast/members.rb#439 + def instance?; end + + # Returns the value of attribute kind. + # + # source://rbs/lib/rbs/ast/members.rb#400 + def kind; end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/ast/members.rb#402 + def location; end + + # Returns the value of attribute new_name. + # + # source://rbs/lib/rbs/ast/members.rb#398 + def new_name; end + + # Returns the value of attribute old_name. + # + # source://rbs/lib/rbs/ast/members.rb#399 + def old_name; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/ast/members.rb#443 + def singleton?; end + + # source://rbs/lib/rbs/ast/members.rb#427 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs/lib/rbs/ast/members.rb#327 +class RBS::AST::Members::AttrAccessor < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Attribute + + # source://rbs/lib/rbs/ast/members.rb#330 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs/lib/rbs/ast/members.rb#309 +class RBS::AST::Members::AttrReader < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Attribute + + # source://rbs/lib/rbs/ast/members.rb#312 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs/lib/rbs/ast/members.rb#345 +class RBS::AST::Members::AttrWriter < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Attribute + + # source://rbs/lib/rbs/ast/members.rb#348 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs/lib/rbs/ast/members.rb#258 +module RBS::AST::Members::Attribute + # source://rbs/lib/rbs/ast/members.rb#268 + def initialize(name:, type:, ivar_name:, kind:, annotations:, location:, comment:, visibility: T.unsafe(nil)); end + + # source://rbs/lib/rbs/ast/members.rb#279 + def ==(other); end + + # Returns the value of attribute annotations. + # + # source://rbs/lib/rbs/ast/members.rb#263 + def annotations; end + + # Returns the value of attribute comment. + # + # source://rbs/lib/rbs/ast/members.rb#265 + def comment; end + + # source://rbs/lib/rbs/ast/members.rb#279 + def eql?(other); end + + # source://rbs/lib/rbs/ast/members.rb#290 + def hash; end + + # Returns the value of attribute ivar_name. + # + # source://rbs/lib/rbs/ast/members.rb#262 + def ivar_name; end + + # Returns the value of attribute kind. + # + # source://rbs/lib/rbs/ast/members.rb#261 + def kind; end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/ast/members.rb#264 + def location; end + + # Returns the value of attribute name. + # + # source://rbs/lib/rbs/ast/members.rb#259 + def name; end + + # Returns the value of attribute type. + # + # source://rbs/lib/rbs/ast/members.rb#260 + def type; end + + # source://rbs/lib/rbs/ast/members.rb#294 + def update(name: T.unsafe(nil), type: T.unsafe(nil), ivar_name: T.unsafe(nil), kind: T.unsafe(nil), annotations: T.unsafe(nil), location: T.unsafe(nil), comment: T.unsafe(nil), visibility: T.unsafe(nil)); end + + # Returns the value of attribute visibility. + # + # source://rbs/lib/rbs/ast/members.rb#266 + def visibility; end +end + +# source://rbs/lib/rbs/ast/members.rb#6 +class RBS::AST::Members::Base; end + +# source://rbs/lib/rbs/ast/members.rb#157 +class RBS::AST::Members::ClassInstanceVariable < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Var + + # source://rbs/lib/rbs/ast/members.rb#160 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs/lib/rbs/ast/members.rb#171 +class RBS::AST::Members::ClassVariable < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Var + + # source://rbs/lib/rbs/ast/members.rb#174 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs/lib/rbs/ast/members.rb#228 +class RBS::AST::Members::Extend < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Mixin + + # source://rbs/lib/rbs/ast/members.rb#231 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs/lib/rbs/ast/members.rb#213 +class RBS::AST::Members::Include < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Mixin + + # source://rbs/lib/rbs/ast/members.rb#216 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs/lib/rbs/ast/members.rb#143 +class RBS::AST::Members::InstanceVariable < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Var + + # source://rbs/lib/rbs/ast/members.rb#146 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs/lib/rbs/ast/members.rb#363 +module RBS::AST::Members::LocationOnly + # source://rbs/lib/rbs/ast/members.rb#366 + def initialize(location:); end + + # source://rbs/lib/rbs/ast/members.rb#370 + def ==(other); end + + # source://rbs/lib/rbs/ast/members.rb#370 + def eql?(other); end + + # source://rbs/lib/rbs/ast/members.rb#376 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/ast/members.rb#364 + def location; end +end + +# source://rbs/lib/rbs/ast/members.rb#9 +class RBS::AST::Members::MethodDefinition < ::RBS::AST::Members::Base + # @return [MethodDefinition] a new instance of MethodDefinition + # + # source://rbs/lib/rbs/ast/members.rb#53 + def initialize(name:, kind:, overloads:, annotations:, location:, comment:, overloading:, visibility:); end + + # source://rbs/lib/rbs/ast/members.rb#64 + def ==(other); end + + # Returns the value of attribute annotations. + # + # source://rbs/lib/rbs/ast/members.rb#47 + def annotations; end + + # Returns the value of attribute comment. + # + # source://rbs/lib/rbs/ast/members.rb#49 + def comment; end + + # source://rbs/lib/rbs/ast/members.rb#64 + def eql?(other); end + + # source://rbs/lib/rbs/ast/members.rb#75 + def hash; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/ast/members.rb#79 + def instance?; end + + # Returns the value of attribute kind. + # + # source://rbs/lib/rbs/ast/members.rb#45 + def kind; end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/ast/members.rb#48 + def location; end + + # Returns the value of attribute name. + # + # source://rbs/lib/rbs/ast/members.rb#44 + def name; end + + # Returns the value of attribute overloading. + # + # source://rbs/lib/rbs/ast/members.rb#50 + def overloading; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/ast/members.rb#87 + def overloading?; end + + # Returns the value of attribute overloads. + # + # source://rbs/lib/rbs/ast/members.rb#46 + def overloads; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/ast/members.rb#83 + def singleton?; end + + # source://rbs/lib/rbs/ast/members.rb#104 + def to_json(state = T.unsafe(nil)); end + + # source://rbs/lib/rbs/ast/members.rb#91 + def update(name: T.unsafe(nil), kind: T.unsafe(nil), overloads: T.unsafe(nil), annotations: T.unsafe(nil), location: T.unsafe(nil), comment: T.unsafe(nil), overloading: T.unsafe(nil), visibility: T.unsafe(nil)); end + + # Returns the value of attribute visibility. + # + # source://rbs/lib/rbs/ast/members.rb#51 + def visibility; end +end + +# source://rbs/lib/rbs/ast/members.rb#10 +class RBS::AST::Members::MethodDefinition::Overload + # @return [Overload] a new instance of Overload + # + # source://rbs/lib/rbs/ast/members.rb#13 + def initialize(method_type:, annotations:); end + + # source://rbs/lib/rbs/ast/members.rb#18 + def ==(other); end + + # Returns the value of attribute annotations. + # + # source://rbs/lib/rbs/ast/members.rb#11 + def annotations; end + + # source://rbs/lib/rbs/ast/members.rb#18 + def eql?(other); end + + # source://rbs/lib/rbs/ast/members.rb#22 + def hash; end + + # Returns the value of attribute method_type. + # + # source://rbs/lib/rbs/ast/members.rb#11 + def method_type; end + + # source://rbs/lib/rbs/ast/members.rb#32 + def sub(subst); end + + # source://rbs/lib/rbs/ast/members.rb#36 + def to_json(state = T.unsafe(nil)); end + + # source://rbs/lib/rbs/ast/members.rb#28 + def update(annotations: T.unsafe(nil), method_type: T.unsafe(nil)); end +end + +# source://rbs/lib/rbs/ast/members.rb#185 +module RBS::AST::Members::Mixin + # source://rbs/lib/rbs/ast/members.rb#192 + def initialize(name:, args:, annotations:, location:, comment:); end + + # source://rbs/lib/rbs/ast/members.rb#200 + def ==(other); end + + # Returns the value of attribute annotations. + # + # source://rbs/lib/rbs/ast/members.rb#188 + def annotations; end + + # Returns the value of attribute args. + # + # source://rbs/lib/rbs/ast/members.rb#187 + def args; end + + # Returns the value of attribute comment. + # + # source://rbs/lib/rbs/ast/members.rb#190 + def comment; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/ast/members.rb#204 + def eql?(other); end + + # source://rbs/lib/rbs/ast/members.rb#208 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/ast/members.rb#189 + def location; end + + # Returns the value of attribute name. + # + # source://rbs/lib/rbs/ast/members.rb#186 + def name; end +end + +# source://rbs/lib/rbs/ast/members.rb#243 +class RBS::AST::Members::Prepend < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Mixin + + # source://rbs/lib/rbs/ast/members.rb#246 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs/lib/rbs/ast/members.rb#389 +class RBS::AST::Members::Private < ::RBS::AST::Members::Base + include ::RBS::AST::Members::LocationOnly + + # source://rbs/lib/rbs/ast/members.rb#392 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs/lib/rbs/ast/members.rb#381 +class RBS::AST::Members::Public < ::RBS::AST::Members::Base + include ::RBS::AST::Members::LocationOnly + + # source://rbs/lib/rbs/ast/members.rb#384 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs/lib/rbs/ast/members.rb#119 +module RBS::AST::Members::Var + # source://rbs/lib/rbs/ast/members.rb#125 + def initialize(name:, type:, location:, comment:); end + + # source://rbs/lib/rbs/ast/members.rb#132 + def ==(other); end + + # Returns the value of attribute comment. + # + # source://rbs/lib/rbs/ast/members.rb#123 + def comment; end + + # source://rbs/lib/rbs/ast/members.rb#132 + def eql?(other); end + + # source://rbs/lib/rbs/ast/members.rb#138 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/ast/members.rb#122 + def location; end + + # Returns the value of attribute name. + # + # source://rbs/lib/rbs/ast/members.rb#120 + def name; end + + # Returns the value of attribute type. + # + # source://rbs/lib/rbs/ast/members.rb#121 + def type; end +end + +# source://rbs/lib/rbs/ast/type_param.rb#5 +class RBS::AST::TypeParam + # @return [TypeParam] a new instance of TypeParam + # + # source://rbs/lib/rbs/ast/type_param.rb#8 + def initialize(name:, variance:, upper_bound:, location:, default_type: T.unsafe(nil)); end + + # source://rbs/lib/rbs/ast/type_param.rb#33 + def ==(other); end + + # Returns the value of attribute default_type. + # + # source://rbs/lib/rbs/ast/type_param.rb#6 + def default_type; end + + # source://rbs/lib/rbs/ast/type_param.rb#33 + def eql?(other); end + + # source://rbs/lib/rbs/ast/type_param.rb#44 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/ast/type_param.rb#6 + def location; end + + # source://rbs/lib/rbs/ast/type_param.rb#69 + def map_type(&block); end + + # Returns the value of attribute name. + # + # source://rbs/lib/rbs/ast/type_param.rb#6 + def name; end + + # source://rbs/lib/rbs/ast/type_param.rb#59 + def rename(name); end + + # source://rbs/lib/rbs/ast/type_param.rb#48 + def to_json(state = T.unsafe(nil)); end + + # source://rbs/lib/rbs/ast/type_param.rb#127 + def to_s; end + + # source://rbs/lib/rbs/ast/type_param.rb#24 + def unchecked!(value = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/ast/type_param.rb#29 + def unchecked?; end + + # source://rbs/lib/rbs/ast/type_param.rb#17 + def upper_bound; end + + # Returns the value of attribute upper_bound_type. + # + # source://rbs/lib/rbs/ast/type_param.rb#6 + def upper_bound_type; end + + # Returns the value of attribute variance. + # + # source://rbs/lib/rbs/ast/type_param.rb#6 + def variance; end + + class << self + # source://rbs/lib/rbs/ast/type_param.rb#156 + def application(params, args); end + + # source://rbs/lib/rbs/ast/type_param.rb#188 + def normalize_args(params, args); end + + # source://rbs/lib/rbs/ast/type_param.rb#109 + def rename(params, new_names:); end + + # source://rbs/lib/rbs/ast/type_param.rb#87 + def resolve_variables(params); end + + # source://rbs/lib/rbs/ast/type_param.rb#97 + def subst_var(vars, type); end + + # source://rbs/lib/rbs/ast/type_param.rb#209 + def validate(type_params); end + end +end + +# The Visitor class implements the Visitor pattern for traversing the RBS Abstract Syntax Tree (AST). +# +# It provides methods to visit each type of node in the AST, allowing for custom processing of each node type. +# +# This class is designed to be subclassed, with specific visit methods overridden to implement custom behavior for +# different node types. +# +# Example usage: +# +# ~~~rb +# class MyVisitor < RBS::AST::Visitor +# def visit_declaration_class(node) +# puts "Visiting class: #{node.name}" +# +# super # call `super` to run the default visiting behavior +# end +# end +# +# visitor = MyVisitor.new +# visitor.visit(ast_node) +# ~~~ +# +# source://rbs/lib/rbs/ast/visitor.rb#26 +class RBS::AST::Visitor + # source://rbs/lib/rbs/ast/visitor.rb#27 + def visit(node); end + + # source://rbs/lib/rbs/ast/visitor.rb#70 + def visit_all(nodes); end + + # source://rbs/lib/rbs/ast/visitor.rb#79 + def visit_declaration_class(node); end + + # source://rbs/lib/rbs/ast/visitor.rb#87 + def visit_declaration_constant(node); end + + # source://rbs/lib/rbs/ast/visitor.rb#76 + def visit_declaration_global(node); end + + # source://rbs/lib/rbs/ast/visitor.rb#93 + def visit_declaration_interface(node); end + + # source://rbs/lib/rbs/ast/visitor.rb#83 + def visit_declaration_module(node); end + + # source://rbs/lib/rbs/ast/visitor.rb#90 + def visit_declaration_type_alias(node); end + + # source://rbs/lib/rbs/ast/visitor.rb#97 + def visit_member_alias(node); end + + # source://rbs/lib/rbs/ast/visitor.rb#124 + def visit_member_attr_accessor(node); end + + # source://rbs/lib/rbs/ast/visitor.rb#118 + def visit_member_attr_reader(node); end + + # source://rbs/lib/rbs/ast/visitor.rb#121 + def visit_member_attr_writer(node); end + + # source://rbs/lib/rbs/ast/visitor.rb#100 + def visit_member_class_instance_variable(node); end + + # source://rbs/lib/rbs/ast/visitor.rb#103 + def visit_member_class_variable(node); end + + # source://rbs/lib/rbs/ast/visitor.rb#133 + def visit_member_extend(node); end + + # source://rbs/lib/rbs/ast/visitor.rb#127 + def visit_member_include(node); end + + # source://rbs/lib/rbs/ast/visitor.rb#106 + def visit_member_instance_variable(node); end + + # source://rbs/lib/rbs/ast/visitor.rb#115 + def visit_member_method_definition(node); end + + # source://rbs/lib/rbs/ast/visitor.rb#130 + def visit_member_prepend(node); end + + # source://rbs/lib/rbs/ast/visitor.rb#109 + def visit_member_private(node); end + + # source://rbs/lib/rbs/ast/visitor.rb#112 + def visit_member_public(node); end +end + +# source://rbs/lib/rbs/ancestor_graph.rb#4 +class RBS::AncestorGraph + # @return [AncestorGraph] a new instance of AncestorGraph + # + # source://rbs/lib/rbs/ancestor_graph.rb#13 + def initialize(env:, ancestor_builder: T.unsafe(nil)); end + + # Returns the value of attribute ancestor_builder. + # + # source://rbs/lib/rbs/ancestor_graph.rb#9 + def ancestor_builder; end + + # source://rbs/lib/rbs/ancestor_graph.rb#19 + def build; end + + # source://rbs/lib/rbs/ancestor_graph.rb#32 + def build_ancestors(node, ancestors); end + + # Returns the value of attribute children. + # + # source://rbs/lib/rbs/ancestor_graph.rb#11 + def children; end + + # source://rbs/lib/rbs/ancestor_graph.rb#64 + def each_ancestor(node, yielded: T.unsafe(nil), &block); end + + # source://rbs/lib/rbs/ancestor_graph.rb#56 + def each_child(node, &block); end + + # source://rbs/lib/rbs/ancestor_graph.rb#78 + def each_descendant(node, yielded: T.unsafe(nil), &block); end + + # source://rbs/lib/rbs/ancestor_graph.rb#48 + def each_parent(node, &block); end + + # Returns the value of attribute env. + # + # source://rbs/lib/rbs/ancestor_graph.rb#8 + def env; end + + # Returns the value of attribute parents. + # + # source://rbs/lib/rbs/ancestor_graph.rb#10 + def parents; end + + # source://rbs/lib/rbs/ancestor_graph.rb#43 + def register(parent:, child:); end +end + +# source://rbs/lib/rbs/ancestor_graph.rb#5 +class RBS::AncestorGraph::InstanceNode < ::Struct + def type_name; end + def type_name=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rbs/lib/rbs/ancestor_graph.rb#6 +class RBS::AncestorGraph::SingletonNode < ::Struct + def type_name; end + def type_name=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rbs/lib/rbs/errors.rb#19 +class RBS::BaseError < ::StandardError; end + +# source://rbs/lib/rbs/buffer.rb#4 +class RBS::Buffer + # @return [Buffer] a new instance of Buffer + # + # source://rbs/lib/rbs/buffer.rb#8 + def initialize(name:, content:); end + + # Returns the value of attribute content. + # + # source://rbs/lib/rbs/buffer.rb#6 + def content; end + + # source://rbs/lib/rbs/buffer.rb#63 + def inspect; end + + # source://rbs/lib/rbs/buffer.rb#59 + def last_position; end + + # source://rbs/lib/rbs/buffer.rb#13 + def lines; end + + # source://rbs/lib/rbs/buffer.rb#49 + def loc_to_pos(loc); end + + # Returns the value of attribute name. + # + # source://rbs/lib/rbs/buffer.rb#5 + def name; end + + # source://rbs/lib/rbs/buffer.rb#37 + def pos_to_loc(pos); end + + # source://rbs/lib/rbs/buffer.rb#17 + def ranges; end +end + +# source://rbs/lib/rbs/builtin_names.rb#4 +module RBS::BuiltinNames; end + +# source://rbs/lib/rbs/builtin_names.rb#45 +RBS::BuiltinNames::Array = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs/lib/rbs/builtin_names.rb#37 +RBS::BuiltinNames::BasicObject = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs/lib/rbs/builtin_names.rb#43 +RBS::BuiltinNames::Class = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs/lib/rbs/builtin_names.rb#41 +RBS::BuiltinNames::Comparable = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs/lib/rbs/builtin_names.rb#42 +RBS::BuiltinNames::Enumerable = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs/lib/rbs/builtin_names.rb#48 +RBS::BuiltinNames::Enumerator = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs/lib/rbs/builtin_names.rb#55 +RBS::BuiltinNames::FalseClass = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs/lib/rbs/builtin_names.rb#52 +RBS::BuiltinNames::Float = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs/lib/rbs/builtin_names.rb#46 +RBS::BuiltinNames::Hash = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs/lib/rbs/builtin_names.rb#51 +RBS::BuiltinNames::Integer = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs/lib/rbs/builtin_names.rb#39 +RBS::BuiltinNames::Kernel = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs/lib/rbs/builtin_names.rb#44 +RBS::BuiltinNames::Module = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs/lib/rbs/builtin_names.rb#5 +class RBS::BuiltinNames::Name + # @return [Name] a new instance of Name + # + # source://rbs/lib/rbs/builtin_names.rb#8 + def initialize(name:); end + + # source://rbs/lib/rbs/builtin_names.rb#16 + def instance_type(*args); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/builtin_names.rb#20 + def instance_type?(type); end + + # Returns the value of attribute name. + # + # source://rbs/lib/rbs/builtin_names.rb#6 + def name; end + + # source://rbs/lib/rbs/builtin_names.rb#24 + def singleton_type; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/builtin_names.rb#28 + def singleton_type?(type); end + + # source://rbs/lib/rbs/builtin_names.rb#12 + def to_s; end + + class << self + # source://rbs/lib/rbs/builtin_names.rb#32 + def define(name, namespace: T.unsafe(nil)); end + end +end + +# source://rbs/lib/rbs/builtin_names.rb#56 +RBS::BuiltinNames::Numeric = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs/lib/rbs/builtin_names.rb#38 +RBS::BuiltinNames::Object = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs/lib/rbs/builtin_names.rb#47 +RBS::BuiltinNames::Range = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs/lib/rbs/builtin_names.rb#53 +RBS::BuiltinNames::Regexp = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs/lib/rbs/builtin_names.rb#49 +RBS::BuiltinNames::Set = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs/lib/rbs/builtin_names.rb#40 +RBS::BuiltinNames::String = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs/lib/rbs/builtin_names.rb#50 +RBS::BuiltinNames::Symbol = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs/lib/rbs/builtin_names.rb#54 +RBS::BuiltinNames::TrueClass = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs/lib/rbs/cli/colored_io.rb#4 +class RBS::CLI; end + +# source://rbs/lib/rbs/cli/colored_io.rb#5 +class RBS::CLI::ColoredIO + # @return [ColoredIO] a new instance of ColoredIO + # + # source://rbs/lib/rbs/cli/colored_io.rb#8 + def initialize(stdout:); end + + # source://rbs/lib/rbs/cli/colored_io.rb#28 + def puts(*_arg0, **_arg1, &_arg2); end + + # source://rbs/lib/rbs/cli/colored_io.rb#20 + def puts_green(string); end + + # source://rbs/lib/rbs/cli/colored_io.rb#12 + def puts_red(string); end + + # Returns the value of attribute stdout. + # + # source://rbs/lib/rbs/cli/colored_io.rb#6 + def stdout; end + + private + + # @return [Boolean] + # + # source://rbs/lib/rbs/cli/colored_io.rb#43 + def are_colors_disabled?; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/cli/colored_io.rb#39 + def are_colors_supported?; end + + # https://github.com/rubygems/rubygems/blob/ed65279100234a17d65d71fe26de5083984ac5b8/bundler/lib/bundler/vendor/thor/lib/thor/shell/color.rb#L99-L109 + # + # @return [Boolean] + # + # source://rbs/lib/rbs/cli/colored_io.rb#35 + def can_display_colors?; end +end + +# source://rbs/lib/rbs/collection/sources/base.rb#4 +module RBS::Collection; end + +# source://rbs/lib/rbs/collection/cleaner.rb#5 +class RBS::Collection::Cleaner + # @return [Cleaner] a new instance of Cleaner + # + # source://rbs/lib/rbs/collection/cleaner.rb#8 + def initialize(lockfile_path:); end + + # source://rbs/lib/rbs/collection/cleaner.rb#12 + def clean; end + + # Returns the value of attribute lock. + # + # source://rbs/lib/rbs/collection/cleaner.rb#6 + def lock; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/collection/cleaner.rb#30 + def needed?(gem_name, version); end +end + +# This class represent the configuration file. +# +# source://rbs/lib/rbs/collection/config.rb#7 +class RBS::Collection::Config + # @return [Config] a new instance of Config + # + # source://rbs/lib/rbs/collection/config.rb#49 + def initialize(data, config_path:); end + + # Returns the value of attribute config_path. + # + # source://rbs/lib/rbs/collection/config.rb#19 + def config_path; end + + # Returns the value of attribute data. + # + # source://rbs/lib/rbs/collection/config.rb#19 + def data; end + + # source://rbs/lib/rbs/collection/config.rb#54 + def gem(gem_name); end + + # source://rbs/lib/rbs/collection/config.rb#74 + def gems; end + + # source://rbs/lib/rbs/collection/config.rb#58 + def repo_path; end + + # source://rbs/lib/rbs/collection/config.rb#62 + def repo_path_data; end + + # source://rbs/lib/rbs/collection/config.rb#66 + def sources; end + + class << self + # source://rbs/lib/rbs/collection/config.rb#21 + def find_config_path; end + + # source://rbs/lib/rbs/collection/config.rb#41 + def from_path(path); end + + # Generate a rbs lockfile from Gemfile.lock to `config_path`. + # If `with_lockfile` is true, it respects existing rbs lockfile. + # + # source://rbs/lib/rbs/collection/config.rb#34 + def generate_lockfile(config_path:, definition:, with_lockfile: T.unsafe(nil)); end + + # source://rbs/lib/rbs/collection/config.rb#45 + def to_lockfile_path(config_path); end + end +end + +# source://rbs/lib/rbs/collection/config.rb#8 +class RBS::Collection::Config::CollectionNotAvailable < ::StandardError + # @return [CollectionNotAvailable] a new instance of CollectionNotAvailable + # + # source://rbs/lib/rbs/collection/config.rb#9 + def initialize; end +end + +# source://rbs/lib/rbs/collection/config/lockfile.rb#6 +class RBS::Collection::Config::Lockfile + # @return [Lockfile] a new instance of Lockfile + # + # source://rbs/lib/rbs/collection/config/lockfile.rb#9 + def initialize(lockfile_path:, path:, gemfile_lock_path:); end + + # @raise [CollectionNotAvailable] + # + # source://rbs/lib/rbs/collection/config/lockfile.rb#73 + def check_rbs_availability!; end + + # source://rbs/lib/rbs/collection/config/lockfile.rb#18 + def fullpath; end + + # source://rbs/lib/rbs/collection/config/lockfile.rb#22 + def gemfile_lock_fullpath; end + + # Returns the value of attribute gemfile_lock_path. + # + # source://rbs/lib/rbs/collection/config/lockfile.rb#7 + def gemfile_lock_path; end + + # Returns the value of attribute gems. + # + # source://rbs/lib/rbs/collection/config/lockfile.rb#7 + def gems; end + + # source://rbs/lib/rbs/collection/config/lockfile.rb#65 + def library_data(lib); end + + # Returns the value of attribute lockfile_dir. + # + # source://rbs/lib/rbs/collection/config/lockfile.rb#7 + def lockfile_dir; end + + # Returns the value of attribute lockfile_path. + # + # source://rbs/lib/rbs/collection/config/lockfile.rb#7 + def lockfile_path; end + + # Returns the value of attribute path. + # + # source://rbs/lib/rbs/collection/config/lockfile.rb#7 + def path; end + + # Returns the value of attribute sources. + # + # source://rbs/lib/rbs/collection/config/lockfile.rb#7 + def sources; end + + # source://rbs/lib/rbs/collection/config/lockfile.rb#28 + def to_lockfile; end + + class << self + # source://rbs/lib/rbs/collection/config/lockfile.rb#42 + def from_lockfile(lockfile_path:, data:); end + end +end + +# source://rbs/lib/rbs/collection/config/lockfile_generator.rb#6 +class RBS::Collection::Config::LockfileGenerator + # @return [LockfileGenerator] a new instance of LockfileGenerator + # + # source://rbs/lib/rbs/collection/config/lockfile_generator.rb#31 + def initialize(config:, definition:, with_lockfile:); end + + # Returns the value of attribute config. + # + # source://rbs/lib/rbs/collection/config/lockfile_generator.rb#23 + def config; end + + # Returns the value of attribute definition. + # + # source://rbs/lib/rbs/collection/config/lockfile_generator.rb#23 + def definition; end + + # Returns the value of attribute existing_lockfile. + # + # source://rbs/lib/rbs/collection/config/lockfile_generator.rb#23 + def existing_lockfile; end + + # Returns the value of attribute gem_entries. + # + # source://rbs/lib/rbs/collection/config/lockfile_generator.rb#23 + def gem_entries; end + + # Returns the value of attribute gem_hash. + # + # source://rbs/lib/rbs/collection/config/lockfile_generator.rb#23 + def gem_hash; end + + # source://rbs/lib/rbs/collection/config/lockfile_generator.rb#59 + def generate; end + + # Returns the value of attribute lockfile. + # + # source://rbs/lib/rbs/collection/config/lockfile_generator.rb#23 + def lockfile; end + + private + + # source://rbs/lib/rbs/collection/config/lockfile_generator.rb#91 + def assign_gem(name:, version:, skip: T.unsafe(nil)); end + + # source://rbs/lib/rbs/collection/config/lockfile_generator.rb#152 + def assign_stdlib(name:, from_gem:); end + + # source://rbs/lib/rbs/collection/config/lockfile_generator.rb#184 + def find_best_version(version:, versions:); end + + # source://rbs/lib/rbs/collection/config/lockfile_generator.rb#178 + def find_source(name:); end + + # source://rbs/lib/rbs/collection/config/lockfile_generator.rb#83 + def validate_gemfile_lock_path!(lock:, gemfile_lock_path:); end + + class << self + # source://rbs/lib/rbs/collection/config/lockfile_generator.rb#25 + def generate(config:, definition:, with_lockfile: T.unsafe(nil)); end + end +end + +# source://rbs/lib/rbs/collection/config/lockfile_generator.rb#7 +class RBS::Collection::Config::LockfileGenerator::GemfileLockMismatchError < ::StandardError + # @return [GemfileLockMismatchError] a new instance of GemfileLockMismatchError + # + # source://rbs/lib/rbs/collection/config/lockfile_generator.rb#8 + def initialize(expected:, actual:); end + + # source://rbs/lib/rbs/collection/config/lockfile_generator.rb#13 + def message; end +end + +# source://rbs/lib/rbs/collection/config.rb#17 +RBS::Collection::Config::PATH = T.let(T.unsafe(nil), Pathname) + +# source://rbs/lib/rbs/collection/installer.rb#5 +class RBS::Collection::Installer + # @return [Installer] a new instance of Installer + # + # source://rbs/lib/rbs/collection/installer.rb#9 + def initialize(lockfile_path:, stdout: T.unsafe(nil)); end + + # source://rbs/lib/rbs/collection/installer.rb#14 + def install_from_lockfile; end + + # Returns the value of attribute lockfile. + # + # source://rbs/lib/rbs/collection/installer.rb#6 + def lockfile; end + + # Returns the value of attribute stdout. + # + # source://rbs/lib/rbs/collection/installer.rb#7 + def stdout; end +end + +# source://rbs/lib/rbs/collection/sources/base.rb#5 +module RBS::Collection::Sources + class << self + # source://rbs/lib/rbs/collection/sources.rb#12 + def from_config_entry(source_entry, base_directory:); end + end +end + +# source://rbs/lib/rbs/collection/sources/base.rb#6 +module RBS::Collection::Sources::Base + # source://rbs/lib/rbs/collection/sources/base.rb#7 + def dependencies_of(name, version); end +end + +# source://rbs/lib/rbs/collection/sources/git.rb#10 +class RBS::Collection::Sources::Git + include ::RBS::Collection::Sources::Base + + # @return [Git] a new instance of Git + # + # source://rbs/lib/rbs/collection/sources/git.rb#18 + def initialize(name:, revision:, remote:, repo_dir:); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/collection/sources/git.rb#26 + def has?(name, version); end + + # source://rbs/lib/rbs/collection/sources/git.rb#43 + def install(dest:, name:, version:, stdout:); end + + # source://rbs/lib/rbs/collection/sources/git.rb#223 + def load_metadata(dir:); end + + # source://rbs/lib/rbs/collection/sources/git.rb#73 + def manifest_of(name, version); end + + # source://rbs/lib/rbs/collection/sources/git.rb#207 + def metadata_content(name:, version:); end + + # Returns the value of attribute name. + # + # source://rbs/lib/rbs/collection/sources/git.rb#16 + def name; end + + # Returns the value of attribute remote. + # + # source://rbs/lib/rbs/collection/sources/git.rb#16 + def remote; end + + # Returns the value of attribute repo_dir. + # + # source://rbs/lib/rbs/collection/sources/git.rb#16 + def repo_dir; end + + # source://rbs/lib/rbs/collection/sources/git.rb#172 + def resolved_revision; end + + # Returns the value of attribute revision. + # + # source://rbs/lib/rbs/collection/sources/git.rb#16 + def revision; end + + # source://rbs/lib/rbs/collection/sources/git.rb#113 + def to_lockfile; end + + # source://rbs/lib/rbs/collection/sources/git.rb#36 + def versions(name); end + + # source://rbs/lib/rbs/collection/sources/git.rb#215 + def write_metadata(dir:, name:, version:); end + + private + + # source://rbs/lib/rbs/collection/sources/git.rb#87 + def _install(dest:, name:, version:); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/collection/sources/git.rb#183 + def commit_hash?; end + + # source://rbs/lib/rbs/collection/sources/git.rb#99 + def cp_r(src, dest); end + + # source://rbs/lib/rbs/collection/sources/git.rb#123 + def format_config_entry(name, version); end + + # source://rbs/lib/rbs/collection/sources/git.rb#168 + def gem_repo_dir; end + + # source://rbs/lib/rbs/collection/sources/git.rb#229 + def gems_versions; end + + # source://rbs/lib/rbs/collection/sources/git.rb#187 + def git(*cmd, **opt); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/collection/sources/git.rb#191 + def git?(*cmd, **opt); end + + # source://rbs/lib/rbs/collection/sources/git.rb#158 + def git_dir; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/collection/sources/git.rb#152 + def need_to_fetch?(revision); end + + # source://rbs/lib/rbs/collection/sources/git.rb#130 + def setup!; end + + # source://rbs/lib/rbs/collection/sources/git.rb#197 + def sh!(*cmd, **opt); end +end + +# source://rbs/lib/rbs/collection/sources/git.rb#14 +class RBS::Collection::Sources::Git::CommandError < ::StandardError; end + +# source://rbs/lib/rbs/collection/sources/git.rb#12 +RBS::Collection::Sources::Git::METADATA_FILENAME = T.let(T.unsafe(nil), String) + +# source://rbs/lib/rbs/collection/sources/local.rb#6 +class RBS::Collection::Sources::Local + include ::RBS::Collection::Sources::Base + + # @return [Local] a new instance of Local + # + # source://rbs/lib/rbs/collection/sources/local.rb#11 + def initialize(path:, base_directory:); end + + # Returns the value of attribute full_path. + # + # source://rbs/lib/rbs/collection/sources/local.rb#9 + def full_path; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/collection/sources/local.rb#17 + def has?(name, version); end + + # Create a symlink instead of copying file to refer files in @path. + # By avoiding copying RBS files, the users do not need re-run `rbs collection install` + # when the RBS files are updated. + # + # source://rbs/lib/rbs/collection/sources/local.rb#32 + def install(dest:, name:, version:, stdout:); end + + # source://rbs/lib/rbs/collection/sources/local.rb#64 + def manifest_of(name, version); end + + # Returns the value of attribute path. + # + # source://rbs/lib/rbs/collection/sources/local.rb#9 + def path; end + + # source://rbs/lib/rbs/collection/sources/local.rb#72 + def to_lockfile; end + + # source://rbs/lib/rbs/collection/sources/local.rb#25 + def versions(name); end + + private + + # source://rbs/lib/rbs/collection/sources/local.rb#59 + def _install(src, dst); end +end + +# Signatures that are inclduded in gem package as sig/ directory. +# +# source://rbs/lib/rbs/collection/sources/rubygems.rb#9 +class RBS::Collection::Sources::Rubygems + include ::RBS::Collection::Sources::Base + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # @return [Boolean] + # + # source://rbs/lib/rbs/collection/sources/rubygems.rb#13 + def has?(name, version); end + + # source://rbs/lib/rbs/collection/sources/rubygems.rb#23 + def install(dest:, name:, version:, stdout:); end + + # source://rbs/lib/rbs/collection/sources/rubygems.rb#29 + def manifest_of(name, version); end + + # source://rbs/lib/rbs/collection/sources/rubygems.rb#36 + def to_lockfile; end + + # source://rbs/lib/rbs/collection/sources/rubygems.rb#17 + def versions(name); end + + private + + # source://rbs/lib/rbs/collection/sources/rubygems.rb#42 + def gem_sig_path(name, version); end + + class << self + private + + def allocate; end + def new(*_arg0); end + end +end + +# signatures that are bundled in rbs gem under the stdlib/ directory +# +# source://rbs/lib/rbs/collection/sources/stdlib.rb#9 +class RBS::Collection::Sources::Stdlib + include ::RBS::Collection::Sources::Base + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # @return [Boolean] + # + # source://rbs/lib/rbs/collection/sources/stdlib.rb#15 + def has?(name, version); end + + # source://rbs/lib/rbs/collection/sources/stdlib.rb#23 + def install(dest:, name:, version:, stdout:); end + + # source://rbs/lib/rbs/collection/sources/stdlib.rb#29 + def manifest_of(name, version); end + + # source://rbs/lib/rbs/collection/sources/stdlib.rb#38 + def to_lockfile; end + + # source://rbs/lib/rbs/collection/sources/stdlib.rb#19 + def versions(name); end + + private + + # source://rbs/lib/rbs/collection/sources/stdlib.rb#44 + def lookup(name, version); end + + class << self + private + + def allocate; end + def new(*_arg0); end + end +end + +# source://rbs/lib/rbs/collection/sources/stdlib.rb#13 +RBS::Collection::Sources::Stdlib::REPO = T.let(T.unsafe(nil), RBS::Repository) + +# source://rbs/lib/rbs/constant.rb#4 +class RBS::Constant + # @return [Constant] a new instance of Constant + # + # source://rbs/lib/rbs/constant.rb#9 + def initialize(name:, type:, entry:); end + + # source://rbs/lib/rbs/constant.rb#15 + def ==(other); end + + # Returns the value of attribute entry. + # + # source://rbs/lib/rbs/constant.rb#7 + def entry; end + + # source://rbs/lib/rbs/constant.rb#15 + def eql?(other); end + + # source://rbs/lib/rbs/constant.rb#24 + def hash; end + + # Returns the value of attribute name. + # + # source://rbs/lib/rbs/constant.rb#5 + def name; end + + # Returns the value of attribute type. + # + # source://rbs/lib/rbs/constant.rb#6 + def type; end +end + +# source://rbs/lib/rbs/errors.rb#553 +class RBS::CyclicClassAliasDefinitionError < ::RBS::BaseError + include ::RBS::DetailedMessageable + + # @return [CyclicClassAliasDefinitionError] a new instance of CyclicClassAliasDefinitionError + # + # source://rbs/lib/rbs/errors.rb#558 + def initialize(entry); end + + # Returns the value of attribute alias_entry. + # + # source://rbs/lib/rbs/errors.rb#556 + def alias_entry; end + + # source://rbs/lib/rbs/errors.rb#564 + def location; end +end + +# source://rbs/lib/rbs/errors.rb#514 +class RBS::CyclicTypeParameterBound < ::RBS::BaseError + include ::RBS::DetailedMessageable + + # @return [CyclicTypeParameterBound] a new instance of CyclicTypeParameterBound + # + # source://rbs/lib/rbs/errors.rb#519 + def initialize(type_name:, method_name:, params:, location:); end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/errors.rb#517 + def location; end + + # Returns the value of attribute method_name. + # + # source://rbs/lib/rbs/errors.rb#517 + def method_name; end + + # Returns the value of attribute params. + # + # source://rbs/lib/rbs/errors.rb#517 + def params; end + + # Returns the value of attribute type_name. + # + # source://rbs/lib/rbs/errors.rb#517 + def type_name; end +end + +# source://rbs/lib/rbs/definition.rb#4 +class RBS::Definition + # @return [Definition] a new instance of Definition + # + # source://rbs/lib/rbs/definition.rb#282 + def initialize(type_name:, entry:, self_type:, ancestors:); end + + # Returns the value of attribute ancestors. + # + # source://rbs/lib/rbs/definition.rb#276 + def ancestors; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/definition.rb#305 + def class?; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/definition.rb#322 + def class_type?; end + + # Returns the value of attribute class_variables. + # + # source://rbs/lib/rbs/definition.rb#280 + def class_variables; end + + # source://rbs/lib/rbs/definition.rb#367 + def each_type(&block); end + + # Returns the value of attribute entry. + # + # source://rbs/lib/rbs/definition.rb#275 + def entry; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/definition.rb#326 + def instance_type?; end + + # Returns the value of attribute instance_variables. + # + # source://rbs/lib/rbs/definition.rb#279 + def instance_variables; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/definition.rb#313 + def interface?; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/definition.rb#330 + def interface_type?; end + + # source://rbs/lib/rbs/definition.rb#357 + def map_method_type(&block); end + + # Returns the value of attribute methods. + # + # source://rbs/lib/rbs/definition.rb#278 + def methods; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/definition.rb#309 + def module?; end + + # Returns the value of attribute self_type. + # + # source://rbs/lib/rbs/definition.rb#277 + def self_type; end + + # source://rbs/lib/rbs/definition.rb#347 + def sub(s); end + + # Returns the value of attribute type_name. + # + # source://rbs/lib/rbs/definition.rb#274 + def type_name; end + + # source://rbs/lib/rbs/definition.rb#334 + def type_params; end + + # source://rbs/lib/rbs/definition.rb#338 + def type_params_decl; end +end + +# source://rbs/lib/rbs/definition.rb#189 +module RBS::Definition::Ancestor; end + +# source://rbs/lib/rbs/definition.rb#190 +class RBS::Definition::Ancestor::Instance + # @return [Instance] a new instance of Instance + # + # source://rbs/lib/rbs/definition.rb#193 + def initialize(name:, args:, source:); end + + # source://rbs/lib/rbs/definition.rb#199 + def ==(other); end + + # Returns the value of attribute args. + # + # source://rbs/lib/rbs/definition.rb#191 + def args; end + + # source://rbs/lib/rbs/definition.rb#199 + def eql?(other); end + + # source://rbs/lib/rbs/definition.rb#205 + def hash; end + + # Returns the value of attribute name. + # + # source://rbs/lib/rbs/definition.rb#191 + def name; end + + # Returns the value of attribute source. + # + # source://rbs/lib/rbs/definition.rb#191 + def source; end +end + +# source://rbs/lib/rbs/definition.rb#210 +class RBS::Definition::Ancestor::Singleton + # @return [Singleton] a new instance of Singleton + # + # source://rbs/lib/rbs/definition.rb#213 + def initialize(name:); end + + # source://rbs/lib/rbs/definition.rb#217 + def ==(other); end + + # source://rbs/lib/rbs/definition.rb#217 + def eql?(other); end + + # source://rbs/lib/rbs/definition.rb#223 + def hash; end + + # Returns the value of attribute name. + # + # source://rbs/lib/rbs/definition.rb#211 + def name; end +end + +# source://rbs/lib/rbs/definition.rb#229 +class RBS::Definition::InstanceAncestors + # @return [InstanceAncestors] a new instance of InstanceAncestors + # + # source://rbs/lib/rbs/definition.rb#234 + def initialize(type_name:, params:, ancestors:); end + + # Returns the value of attribute ancestors. + # + # source://rbs/lib/rbs/definition.rb#232 + def ancestors; end + + # source://rbs/lib/rbs/definition.rb#240 + def apply(args, env:, location:); end + + # Returns the value of attribute params. + # + # source://rbs/lib/rbs/definition.rb#231 + def params; end + + # Returns the value of attribute type_name. + # + # source://rbs/lib/rbs/definition.rb#230 + def type_name; end +end + +# source://rbs/lib/rbs/definition.rb#25 +class RBS::Definition::Method + # @return [Method] a new instance of Method + # + # source://rbs/lib/rbs/definition.rb#81 + def initialize(super_method:, defs:, accessibility:, alias_of:, annotations: T.unsafe(nil)); end + + # source://rbs/lib/rbs/definition.rb#89 + def ==(other); end + + # Returns the value of attribute accessibility. + # + # source://rbs/lib/rbs/definition.rb#77 + def accessibility; end + + # Returns the value of attribute alias_of. + # + # source://rbs/lib/rbs/definition.rb#79 + def alias_of; end + + # source://rbs/lib/rbs/definition.rb#126 + def annotations; end + + # source://rbs/lib/rbs/definition.rb#122 + def comments; end + + # source://rbs/lib/rbs/definition.rb#104 + def defined_in; end + + # Returns the value of attribute defs. + # + # source://rbs/lib/rbs/definition.rb#76 + def defs; end + + # source://rbs/lib/rbs/definition.rb#89 + def eql?(other); end + + # Returns the value of attribute extra_annotations. + # + # source://rbs/lib/rbs/definition.rb#78 + def extra_annotations; end + + # source://rbs/lib/rbs/definition.rb#100 + def hash; end + + # source://rbs/lib/rbs/definition.rb#111 + def implemented_in; end + + # source://rbs/lib/rbs/definition.rb#169 + def map_method_type(&block); end + + # source://rbs/lib/rbs/definition.rb#151 + def map_type(&block); end + + # source://rbs/lib/rbs/definition.rb#160 + def map_type_bound(&block); end + + # source://rbs/lib/rbs/definition.rb#130 + def members; end + + # source://rbs/lib/rbs/definition.rb#118 + def method_types; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/definition.rb#138 + def private?; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/definition.rb#134 + def public?; end + + # source://rbs/lib/rbs/definition.rb#142 + def sub(s); end + + # Returns the value of attribute super_method. + # + # source://rbs/lib/rbs/definition.rb#75 + def super_method; end + + # source://rbs/lib/rbs/definition.rb#178 + def update(super_method: T.unsafe(nil), defs: T.unsafe(nil), accessibility: T.unsafe(nil), alias_of: T.unsafe(nil), annotations: T.unsafe(nil)); end +end + +# source://rbs/lib/rbs/definition.rb#26 +class RBS::Definition::Method::TypeDef + # @return [TypeDef] a new instance of TypeDef + # + # source://rbs/lib/rbs/definition.rb#32 + def initialize(type:, member:, defined_in:, implemented_in:); end + + # source://rbs/lib/rbs/definition.rb#39 + def ==(other); end + + # source://rbs/lib/rbs/definition.rb#57 + def annotations; end + + # source://rbs/lib/rbs/definition.rb#53 + def comment; end + + # Returns the value of attribute defined_in. + # + # source://rbs/lib/rbs/definition.rb#29 + def defined_in; end + + # source://rbs/lib/rbs/definition.rb#39 + def eql?(other); end + + # source://rbs/lib/rbs/definition.rb#49 + def hash; end + + # Returns the value of attribute implemented_in. + # + # source://rbs/lib/rbs/definition.rb#30 + def implemented_in; end + + # Returns the value of attribute member. + # + # source://rbs/lib/rbs/definition.rb#28 + def member; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/definition.rb#65 + def overload?; end + + # Returns the value of attribute type. + # + # source://rbs/lib/rbs/definition.rb#27 + def type; end + + # source://rbs/lib/rbs/definition.rb#61 + def update(type: T.unsafe(nil), member: T.unsafe(nil), defined_in: T.unsafe(nil), implemented_in: T.unsafe(nil)); end +end + +# source://rbs/lib/rbs/definition.rb#264 +class RBS::Definition::SingletonAncestors + # @return [SingletonAncestors] a new instance of SingletonAncestors + # + # source://rbs/lib/rbs/definition.rb#268 + def initialize(type_name:, ancestors:); end + + # Returns the value of attribute ancestors. + # + # source://rbs/lib/rbs/definition.rb#266 + def ancestors; end + + # Returns the value of attribute type_name. + # + # source://rbs/lib/rbs/definition.rb#265 + def type_name; end +end + +# source://rbs/lib/rbs/definition.rb#5 +class RBS::Definition::Variable + # @return [Variable] a new instance of Variable + # + # source://rbs/lib/rbs/definition.rb#10 + def initialize(parent_variable:, type:, declared_in:); end + + # Returns the value of attribute declared_in. + # + # source://rbs/lib/rbs/definition.rb#8 + def declared_in; end + + # Returns the value of attribute parent_variable. + # + # source://rbs/lib/rbs/definition.rb#6 + def parent_variable; end + + # source://rbs/lib/rbs/definition.rb#16 + def sub(s); end + + # Returns the value of attribute type. + # + # source://rbs/lib/rbs/definition.rb#7 + def type; end +end + +# source://rbs/lib/rbs/definition_builder.rb#4 +class RBS::DefinitionBuilder + # @return [DefinitionBuilder] a new instance of DefinitionBuilder + # + # source://rbs/lib/rbs/definition_builder.rb#14 + def initialize(env:, ancestor_builder: T.unsafe(nil), method_builder: T.unsafe(nil)); end + + # Returns the value of attribute ancestor_builder. + # + # source://rbs/lib/rbs/definition_builder.rb#6 + def ancestor_builder; end + + # source://rbs/lib/rbs/definition_builder.rb#168 + def build_instance(type_name); end + + # source://rbs/lib/rbs/definition_builder.rb#43 + def build_interface(type_name); end + + # source://rbs/lib/rbs/definition_builder.rb#301 + def build_singleton(type_name); end + + # Builds a definition for singleton without .new method. + # + # source://rbs/lib/rbs/definition_builder.rb#230 + def build_singleton0(type_name); end + + # source://rbs/lib/rbs/definition_builder.rb#85 + def define_instance(definition, type_name, subst); end + + # source://rbs/lib/rbs/definition_builder.rb#33 + def define_interface(definition, type_name, subst); end + + # source://rbs/lib/rbs/definition_builder.rb#606 + def define_method(methods, definition, method, subst, self_type_methods, defined_in:, implemented_in: T.unsafe(nil)); end + + # source://rbs/lib/rbs/definition_builder.rb#25 + def ensure_namespace!(namespace, location:); end + + # Returns the value of attribute env. + # + # source://rbs/lib/rbs/definition_builder.rb#5 + def env; end + + # source://rbs/lib/rbs/definition_builder.rb#767 + def expand_alias(type_name); end + + # source://rbs/lib/rbs/definition_builder.rb#771 + def expand_alias1(type_name); end + + # source://rbs/lib/rbs/definition_builder.rb#778 + def expand_alias2(type_name, args); end + + # source://rbs/lib/rbs/definition_builder.rb#545 + def import_methods(definition, module_name, module_methods, interfaces_methods, subst, self_type_methods); end + + # source://rbs/lib/rbs/definition_builder.rb#537 + def insert_variable(type_name, variables, name:, type:); end + + # Returns the value of attribute instance_cache. + # + # source://rbs/lib/rbs/definition_builder.rb#9 + def instance_cache; end + + # Returns the value of attribute interface_cache. + # + # source://rbs/lib/rbs/definition_builder.rb#12 + def interface_cache; end + + # source://rbs/lib/rbs/definition_builder.rb#411 + def interface_methods(interface_ancestors); end + + # Returns the value of attribute method_builder. + # + # source://rbs/lib/rbs/definition_builder.rb#7 + def method_builder; end + + # Returns the value of attribute singleton0_cache. + # + # source://rbs/lib/rbs/definition_builder.rb#11 + def singleton0_cache; end + + # Returns the value of attribute singleton_cache. + # + # source://rbs/lib/rbs/definition_builder.rb#10 + def singleton_cache; end + + # source://rbs/lib/rbs/definition_builder.rb#441 + def source_location(source, decl); end + + # source://rbs/lib/rbs/definition_builder.rb#66 + def tapp_subst(name, args); end + + # source://rbs/lib/rbs/definition_builder.rb#763 + def try_cache(type_name, cache:); end + + # source://rbs/lib/rbs/definition_builder.rb#802 + def update(env:, except:, ancestor_builder:); end + + # source://rbs/lib/rbs/definition_builder.rb#431 + def validate_params_with(type_params, result:); end + + # @raise [NoTypeFoundError] + # + # source://rbs/lib/rbs/definition_builder.rb#831 + def validate_type_name(name, location); end + + # source://rbs/lib/rbs/definition_builder.rb#455 + def validate_type_params(definition, ancestors:, methods:); end + + # source://rbs/lib/rbs/definition_builder.rb#820 + def validate_type_presence(type); end +end + +# source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#5 +class RBS::DefinitionBuilder::AncestorBuilder + # @return [AncestorBuilder] a new instance of AncestorBuilder + # + # source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#162 + def initialize(env:); end + + # Returns the value of attribute env. + # + # source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#151 + def env; end + + # source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#606 + def fill_ancestor_source(ancestor, name:, source:, &block); end + + # source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#434 + def instance_ancestors(type_name, building_ancestors: T.unsafe(nil)); end + + # Returns the value of attribute instance_ancestors_cache. + # + # source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#154 + def instance_ancestors_cache; end + + # source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#570 + def interface_ancestors(type_name, building_ancestors: T.unsafe(nil)); end + + # Returns the value of attribute interface_ancestors_cache. + # + # source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#160 + def interface_ancestors_cache; end + + # source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#414 + def mixin_ancestors(entry, type_name, included_modules:, included_interfaces:, extended_modules:, prepended_modules:, extended_interfaces:); end + + # source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#348 + def mixin_ancestors0(decl, type_name, align_params:, included_modules:, included_interfaces:, extended_modules:, prepended_modules:, extended_interfaces:); end + + # source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#192 + def one_instance_ancestors(type_name); end + + # Returns the value of attribute one_instance_ancestors_cache. + # + # source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#153 + def one_instance_ancestors_cache; end + + # source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#329 + def one_interface_ancestors(type_name); end + + # Returns the value of attribute one_interface_ancestors_cache. + # + # source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#159 + def one_interface_ancestors_cache; end + + # source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#275 + def one_singleton_ancestors(type_name); end + + # Returns the value of attribute one_singleton_ancestors_cache. + # + # source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#156 + def one_singleton_ancestors_cache; end + + # source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#515 + def singleton_ancestors(type_name, building_ancestors: T.unsafe(nil)); end + + # Returns the value of attribute singleton_ancestors_cache. + # + # source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#157 + def singleton_ancestors_cache; end + + # @raise [SuperclassMismatchError] + # + # source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#175 + def validate_super_class!(type_name, entry); end +end + +# source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#6 +class RBS::DefinitionBuilder::AncestorBuilder::OneAncestors + # @return [OneAncestors] a new instance of OneAncestors + # + # source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#17 + def initialize(type_name:, params:, super_class:, self_types:, included_modules:, included_interfaces:, prepended_modules:, extended_modules:, extended_interfaces:); end + + # source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#29 + def each_ancestor(&block); end + + # source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#86 + def each_extended_interface(&block); end + + # source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#78 + def each_extended_module(&block); end + + # source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#62 + def each_included_interface(&block); end + + # source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#54 + def each_included_module(&block); end + + # source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#70 + def each_prepended_module(&block); end + + # source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#46 + def each_self_type(&block); end + + # Returns the value of attribute extended_interfaces. + # + # source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#15 + def extended_interfaces; end + + # Returns the value of attribute extended_modules. + # + # source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#14 + def extended_modules; end + + # Returns the value of attribute included_interfaces. + # + # source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#12 + def included_interfaces; end + + # Returns the value of attribute included_modules. + # + # source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#11 + def included_modules; end + + # Returns the value of attribute params. + # + # source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#8 + def params; end + + # Returns the value of attribute prepended_modules. + # + # source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#13 + def prepended_modules; end + + # Returns the value of attribute self_types. + # + # source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#10 + def self_types; end + + # Returns the value of attribute super_class. + # + # source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#9 + def super_class; end + + # Returns the value of attribute type_name. + # + # source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#7 + def type_name; end + + class << self + # source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#94 + def class_instance(type_name:, params:, super_class:); end + + # source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#136 + def interface(type_name:, params:); end + + # source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#122 + def module_instance(type_name:, params:); end + + # source://rbs/lib/rbs/definition_builder/ancestor_builder.rb#108 + def singleton(type_name:, super_class:); end + end +end + +# source://rbs/lib/rbs/definition_builder/method_builder.rb#5 +class RBS::DefinitionBuilder::MethodBuilder + # @return [MethodBuilder] a new instance of MethodBuilder + # + # source://rbs/lib/rbs/definition_builder/method_builder.rb#91 + def initialize(env:); end + + # source://rbs/lib/rbs/definition_builder/method_builder.rb#194 + def build_alias(methods, type, member:); end + + # source://rbs/lib/rbs/definition_builder/method_builder.rb#199 + def build_attribute(methods, type, member:, accessibility:); end + + # source://rbs/lib/rbs/definition_builder/method_builder.rb#99 + def build_instance(type_name); end + + # source://rbs/lib/rbs/definition_builder/method_builder.rb#174 + def build_interface(type_name); end + + # source://rbs/lib/rbs/definition_builder/method_builder.rb#215 + def build_method(methods, type, member:, accessibility:); end + + # source://rbs/lib/rbs/definition_builder/method_builder.rb#145 + def build_singleton(type_name); end + + # source://rbs/lib/rbs/definition_builder/method_builder.rb#226 + def each_member_with_accessibility(members, accessibility: T.unsafe(nil)); end + + # Returns the value of attribute env. + # + # source://rbs/lib/rbs/definition_builder/method_builder.rb#86 + def env; end + + # Returns the value of attribute instance_methods. + # + # source://rbs/lib/rbs/definition_builder/method_builder.rb#87 + def instance_methods; end + + # Returns the value of attribute interface_methods. + # + # source://rbs/lib/rbs/definition_builder/method_builder.rb#89 + def interface_methods; end + + # Returns the value of attribute singleton_methods. + # + # source://rbs/lib/rbs/definition_builder/method_builder.rb#88 + def singleton_methods; end + + # source://rbs/lib/rbs/definition_builder/method_builder.rb#239 + def update(env:, except:); end +end + +# source://rbs/lib/rbs/definition_builder/method_builder.rb#6 +class RBS::DefinitionBuilder::MethodBuilder::Methods + # @return [Methods] a new instance of Methods + # + # source://rbs/lib/rbs/definition_builder/method_builder.rb#30 + def initialize(type:); end + + # source://rbs/lib/rbs/definition_builder/method_builder.rb#49 + def each; end + + # Returns the value of attribute methods. + # + # source://rbs/lib/rbs/definition_builder/method_builder.rb#28 + def methods; end + + # Returns the value of attribute type. + # + # source://rbs/lib/rbs/definition_builder/method_builder.rb#27 + def type; end + + # source://rbs/lib/rbs/definition_builder/method_builder.rb#35 + def validate!; end +end + +# source://rbs/lib/rbs/definition_builder/method_builder.rb#7 +class RBS::DefinitionBuilder::MethodBuilder::Methods::Definition < ::Struct + # source://rbs/lib/rbs/definition_builder/method_builder.rb#14 + def accessibility; end + + # source://rbs/lib/rbs/definition_builder/method_builder.rb#10 + def original; end + + class << self + # source://rbs/lib/rbs/definition_builder/method_builder.rb#22 + def empty(name:, type:); end + end +end + +# source://rbs/lib/rbs/definition_builder/method_builder.rb#63 +class RBS::DefinitionBuilder::MethodBuilder::Methods::Sorter + include ::TSort + + # @return [Sorter] a new instance of Sorter + # + # source://rbs/lib/rbs/definition_builder/method_builder.rb#68 + def initialize(methods); end + + # Returns the value of attribute methods. + # + # source://rbs/lib/rbs/definition_builder/method_builder.rb#66 + def methods; end + + # source://rbs/lib/rbs/definition_builder/method_builder.rb#76 + def tsort_each_child(defn); end + + # source://rbs/lib/rbs/definition_builder/method_builder.rb#72 + def tsort_each_node(&block); end +end + +# source://rbs/lib/rbs/errors.rb#21 +class RBS::DefinitionError < ::RBS::BaseError; end + +# source://rbs/lib/rbs/errors.rb#23 +module RBS::DetailedMessageable + # source://rbs/lib/rbs/errors.rb#24 + def detailed_message(highlight: T.unsafe(nil), **_arg1); end +end + +# source://rbs/lib/rbs/diff.rb#4 +class RBS::Diff + # @return [Diff] a new instance of Diff + # + # source://rbs/lib/rbs/diff.rb#5 + def initialize(type_name:, library_options:, after_path: T.unsafe(nil), before_path: T.unsafe(nil), detail: T.unsafe(nil)); end + + # source://rbs/lib/rbs/diff.rb#13 + def each_diff(&block); end + + private + + # source://rbs/lib/rbs/diff.rb#96 + def build_builder(env); end + + # source://rbs/lib/rbs/diff.rb#77 + def build_env(path); end + + # source://rbs/lib/rbs/diff.rb#49 + def build_methods(path); end + + # source://rbs/lib/rbs/diff.rb#116 + def constant_to_s(constant); end + + # source://rbs/lib/rbs/diff.rb#100 + def definition_method_to_s(key, kind, definition_method); end + + # source://rbs/lib/rbs/diff.rb#38 + def each_diff_constants(before_constant_children, after_constant_children); end + + # source://rbs/lib/rbs/diff.rb#27 + def each_diff_methods(kind, before_methods, after_methods); end +end + +# source://rbs/lib/rbs/errors.rb#394 +class RBS::DuplicatedDeclarationError < ::RBS::LoadingError + # @return [DuplicatedDeclarationError] a new instance of DuplicatedDeclarationError + # + # source://rbs/lib/rbs/errors.rb#398 + def initialize(name, *decls); end + + # Returns the value of attribute decls. + # + # source://rbs/lib/rbs/errors.rb#396 + def decls; end + + # Returns the value of attribute name. + # + # source://rbs/lib/rbs/errors.rb#395 + def name; end +end + +# source://rbs/lib/rbs/errors.rb#292 +class RBS::DuplicatedInterfaceMethodDefinitionError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [DuplicatedInterfaceMethodDefinitionError] a new instance of DuplicatedInterfaceMethodDefinitionError + # + # source://rbs/lib/rbs/errors.rb#299 + def initialize(type:, method_name:, member:); end + + # source://rbs/lib/rbs/errors.rb#307 + def location; end + + # Returns the value of attribute member. + # + # source://rbs/lib/rbs/errors.rb#297 + def member; end + + # Returns the value of attribute method_name. + # + # source://rbs/lib/rbs/errors.rb#296 + def method_name; end + + # source://rbs/lib/rbs/errors.rb#311 + def qualified_method_name; end + + # Returns the value of attribute type. + # + # source://rbs/lib/rbs/errors.rb#295 + def type; end + + # source://rbs/lib/rbs/errors.rb#320 + def type_name; end +end + +# source://rbs/lib/rbs/errors.rb#251 +class RBS::DuplicatedMethodDefinitionError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [DuplicatedMethodDefinitionError] a new instance of DuplicatedMethodDefinitionError + # + # source://rbs/lib/rbs/errors.rb#258 + def initialize(type:, method_name:, members:); end + + # source://rbs/lib/rbs/errors.rb#283 + def location; end + + # Returns the value of attribute members. + # + # source://rbs/lib/rbs/errors.rb#256 + def members; end + + # Returns the value of attribute method_name. + # + # source://rbs/lib/rbs/errors.rb#255 + def method_name; end + + # source://rbs/lib/rbs/errors.rb#287 + def other_locations; end + + # source://rbs/lib/rbs/errors.rb#270 + def qualified_method_name; end + + # Returns the value of attribute type. + # + # source://rbs/lib/rbs/errors.rb#254 + def type; end + + # source://rbs/lib/rbs/errors.rb#279 + def type_name; end +end + +# source://rbs/lib/rbs/environment.rb#4 +class RBS::Environment + # @return [Environment] a new instance of Environment + # + # source://rbs/lib/rbs/environment.rb#145 + def initialize; end + + # source://rbs/lib/rbs/environment.rb#470 + def <<(decl); end + + # source://rbs/lib/rbs/environment.rb#792 + def absolute_type(resolver, map, type, context:); end + + # source://rbs/lib/rbs/environment.rb#787 + def absolute_type_name(resolver, map, type_name, context:); end + + # source://rbs/lib/rbs/environment.rb#476 + def add_signature(buffer:, directives:, decls:); end + + # source://rbs/lib/rbs/environment.rb#528 + def append_context(context, decl); end + + # source://rbs/lib/rbs/environment.rb#803 + def buffers; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/environment.rb#218 + def class_alias?(name); end + + # Returns the value of attribute class_alias_decls. + # + # source://rbs/lib/rbs/environment.rb#12 + def class_alias_decls; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/environment.rb#202 + def class_decl?(name); end + + # Returns the value of attribute class_decls. + # + # source://rbs/lib/rbs/environment.rb#7 + def class_decls; end + + # source://rbs/lib/rbs/environment.rb#226 + def class_entry(type_name); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/environment.rb#198 + def constant_decl?(name); end + + # Returns the value of attribute constant_decls. + # + # source://rbs/lib/rbs/environment.rb#10 + def constant_decls; end + + # source://rbs/lib/rbs/environment.rb#274 + def constant_entry(type_name); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/environment.rb#194 + def constant_name?(name); end + + # Returns the value of attribute declarations. + # + # source://rbs/lib/rbs/environment.rb#5 + def declarations; end + + # Returns the value of attribute global_decls. + # + # source://rbs/lib/rbs/environment.rb#11 + def global_decls; end + + # source://rbs/lib/rbs/environment.rb#373 + def insert_decl(decl, outer:, namespace:); end + + # source://rbs/lib/rbs/environment.rb#798 + def inspect; end + + # Returns the value of attribute interface_decls. + # + # source://rbs/lib/rbs/environment.rb#8 + def interface_decls; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/environment.rb#176 + def interface_name?(name); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/environment.rb#210 + def module_alias?(name); end + + # source://rbs/lib/rbs/environment.rb#266 + def module_class_entry(type_name); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/environment.rb#206 + def module_decl?(name); end + + # source://rbs/lib/rbs/environment.rb#235 + def module_entry(type_name); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/environment.rb#184 + def module_name?(name); end + + # source://rbs/lib/rbs/environment.rb#332 + def normalize_module_name(name); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/environment.rb#336 + def normalize_module_name?(name); end + + # source://rbs/lib/rbs/environment.rb#328 + def normalize_type_name(name); end + + # source://rbs/lib/rbs/environment.rb#297 + def normalize_type_name!(name); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/environment.rb#278 + def normalize_type_name?(name); end + + # source://rbs/lib/rbs/environment.rb#244 + def normalized_class_entry(type_name); end + + # source://rbs/lib/rbs/environment.rb#270 + def normalized_module_class_entry(type_name); end + + # source://rbs/lib/rbs/environment.rb#255 + def normalized_module_entry(type_name); end + + # source://rbs/lib/rbs/environment.rb#323 + def normalized_type_name!(name); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/environment.rb#310 + def normalized_type_name?(type_name); end + + # source://rbs/lib/rbs/environment.rb#537 + def resolve_declaration(resolver, map, decl, outer:, prefix:); end + + # source://rbs/lib/rbs/environment.rb#673 + def resolve_member(resolver, map, member, context:); end + + # source://rbs/lib/rbs/environment.rb#773 + def resolve_method_type(resolver, map, type, context:); end + + # source://rbs/lib/rbs/environment.rb#489 + def resolve_type_names(only: T.unsafe(nil)); end + + # source://rbs/lib/rbs/environment.rb#781 + def resolve_type_params(resolver, map, params, context:); end + + # source://rbs/lib/rbs/environment.rb#522 + def resolver_context(*nesting); end + + # Returns the value of attribute signatures. + # + # source://rbs/lib/rbs/environment.rb#14 + def signatures; end + + # Returns the value of attribute type_alias_decls. + # + # source://rbs/lib/rbs/environment.rb#9 + def type_alias_decls; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/environment.rb#180 + def type_alias_name?(name); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/environment.rb#188 + def type_name?(name); end + + # source://rbs/lib/rbs/environment.rb#807 + def unload(buffers); end + + # source://rbs/lib/rbs/environment.rb#483 + def validate_type_params; end + + private + + # source://rbs/lib/rbs/environment.rb#158 + def initialize_copy(other); end + + class << self + # source://rbs/lib/rbs/environment.rb#170 + def from_loader(loader); end + end +end + +# source://rbs/lib/rbs/environment.rb#130 +class RBS::Environment::ClassAliasEntry < ::RBS::Environment::SingleEntry; end + +# source://rbs/lib/rbs/environment.rb#100 +class RBS::Environment::ClassEntry < ::RBS::Environment::MultiEntry + # source://rbs/lib/rbs/environment.rb#101 + def primary; end +end + +# source://rbs/lib/rbs/environment.rb#139 +class RBS::Environment::ConstantEntry < ::RBS::Environment::SingleEntry; end + +# source://rbs/lib/rbs/environment.rb#16 +module RBS::Environment::ContextUtil + # source://rbs/lib/rbs/environment.rb#17 + def calculate_context(decls); end +end + +# source://rbs/lib/rbs/environment.rb#142 +class RBS::Environment::GlobalEntry < ::RBS::Environment::SingleEntry; end + +# source://rbs/lib/rbs/environment.rb#133 +class RBS::Environment::InterfaceEntry < ::RBS::Environment::SingleEntry; end + +# source://rbs/lib/rbs/environment.rb#127 +class RBS::Environment::ModuleAliasEntry < ::RBS::Environment::SingleEntry; end + +# source://rbs/lib/rbs/environment.rb#85 +class RBS::Environment::ModuleEntry < ::RBS::Environment::MultiEntry + # source://rbs/lib/rbs/environment.rb#92 + def primary; end + + # source://rbs/lib/rbs/environment.rb#86 + def self_types; end +end + +# source://rbs/lib/rbs/environment.rb#29 +class RBS::Environment::MultiEntry + # @return [MultiEntry] a new instance of MultiEntry + # + # source://rbs/lib/rbs/environment.rb#43 + def initialize(name:); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/environment.rb#70 + def compatible_params?(ps1, ps2); end + + # Returns the value of attribute decls. + # + # source://rbs/lib/rbs/environment.rb#41 + def decls; end + + # source://rbs/lib/rbs/environment.rb#48 + def insert(decl:, outer:); end + + # Returns the value of attribute name. + # + # source://rbs/lib/rbs/environment.rb#40 + def name; end + + # source://rbs/lib/rbs/environment.rb#80 + def primary; end + + # source://rbs/lib/rbs/environment.rb#76 + def type_params; end + + # source://rbs/lib/rbs/environment.rb#53 + def validate_type_params; end +end + +# source://rbs/lib/rbs/environment.rb#30 +class RBS::Environment::MultiEntry::D < ::Struct + include ::RBS::Environment::ContextUtil + + # source://rbs/lib/rbs/environment.rb#35 + def context; end + + def decl; end + def decl=(_); end + def outer; end + def outer=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rbs/lib/rbs/environment.rb#109 +class RBS::Environment::SingleEntry + include ::RBS::Environment::ContextUtil + + # @return [SingleEntry] a new instance of SingleEntry + # + # source://rbs/lib/rbs/environment.rb#114 + def initialize(name:, decl:, outer:); end + + # source://rbs/lib/rbs/environment.rb#122 + def context; end + + # Returns the value of attribute decl. + # + # source://rbs/lib/rbs/environment.rb#112 + def decl; end + + # Returns the value of attribute name. + # + # source://rbs/lib/rbs/environment.rb#110 + def name; end + + # Returns the value of attribute outer. + # + # source://rbs/lib/rbs/environment.rb#111 + def outer; end +end + +# source://rbs/lib/rbs/environment.rb#136 +class RBS::Environment::TypeAliasEntry < ::RBS::Environment::SingleEntry; end + +# source://rbs/lib/rbs/environment/use_map.rb#5 +class RBS::Environment::UseMap + # @return [UseMap] a new instance of UseMap + # + # source://rbs/lib/rbs/environment/use_map.rb#30 + def initialize(table:); end + + # source://rbs/lib/rbs/environment/use_map.rb#36 + def build_map(clause); end + + # source://rbs/lib/rbs/environment/use_map.rb#72 + def resolve(type_name); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/environment/use_map.rb#53 + def resolve?(type_name); end + + # Returns the value of attribute use_dirs. + # + # source://rbs/lib/rbs/environment/use_map.rb#28 + def use_dirs; end +end + +# source://rbs/lib/rbs/environment/use_map.rb#6 +class RBS::Environment::UseMap::Table + # @return [Table] a new instance of Table + # + # source://rbs/lib/rbs/environment/use_map.rb#9 + def initialize; end + + # Returns the value of attribute children. + # + # source://rbs/lib/rbs/environment/use_map.rb#7 + def children; end + + # source://rbs/lib/rbs/environment/use_map.rb#14 + def compute_children; end + + # Returns the value of attribute known_types. + # + # source://rbs/lib/rbs/environment/use_map.rb#7 + def known_types; end +end + +# source://rbs/lib/rbs/environment_loader.rb#4 +class RBS::EnvironmentLoader + include ::RBS::FileFinder + + # @return [EnvironmentLoader] a new instance of EnvironmentLoader + # + # source://rbs/lib/rbs/environment_loader.rb#40 + def initialize(core_root: T.unsafe(nil), repository: T.unsafe(nil)); end + + # source://rbs/lib/rbs/environment_loader.rb#48 + def add(path: T.unsafe(nil), library: T.unsafe(nil), version: T.unsafe(nil), resolve_dependencies: T.unsafe(nil)); end + + # source://rbs/lib/rbs/environment_loader.rb#80 + def add_collection(lockfile); end + + # Returns the value of attribute core_root. + # + # source://rbs/lib/rbs/environment_loader.rb#20 + def core_root; end + + # Returns the value of attribute dirs. + # + # source://rbs/lib/rbs/environment_loader.rb#24 + def dirs; end + + # source://rbs/lib/rbs/environment_loader.rb#126 + def each_dir; end + + # source://rbs/lib/rbs/environment_loader.rb#149 + def each_signature; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/environment_loader.rb#104 + def has_library?(library:, version:); end + + # Returns the value of attribute libs. + # + # source://rbs/lib/rbs/environment_loader.rb#23 + def libs; end + + # source://rbs/lib/rbs/environment_loader.rb#112 + def load(env:); end + + # Returns the value of attribute repository. + # + # source://rbs/lib/rbs/environment_loader.rb#21 + def repository; end + + # source://rbs/lib/rbs/environment_loader.rb#65 + def resolve_dependencies(library:, version:); end + + class << self + # source://rbs/lib/rbs/environment_loader.rb#28 + def gem_sig_path(name, version); end + end +end + +# source://rbs/lib/rbs/environment_loader.rb#26 +RBS::EnvironmentLoader::DEFAULT_CORE_ROOT = T.let(T.unsafe(nil), Pathname) + +# source://rbs/lib/rbs/environment_loader.rb#17 +class RBS::EnvironmentLoader::Library < ::Struct; end + +# source://rbs/lib/rbs/environment_loader.rb#5 +class RBS::EnvironmentLoader::UnknownLibraryError < ::StandardError + # @return [UnknownLibraryError] a new instance of UnknownLibraryError + # + # source://rbs/lib/rbs/environment_loader.rb#8 + def initialize(lib:); end + + # Returns the value of attribute library. + # + # source://rbs/lib/rbs/environment_loader.rb#6 + def library; end +end + +# source://rbs/lib/rbs/environment_walker.rb#4 +class RBS::EnvironmentWalker + include ::TSort + + # @return [EnvironmentWalker] a new instance of EnvironmentWalker + # + # source://rbs/lib/rbs/environment_walker.rb#11 + def initialize(env:); end + + # source://rbs/lib/rbs/environment_walker.rb#16 + def builder; end + + # source://rbs/lib/rbs/environment_walker.rb#99 + def each_type_name(type, &block); end + + # source://rbs/lib/rbs/environment_walker.rb#105 + def each_type_node(type, &block); end + + # Returns the value of attribute env. + # + # source://rbs/lib/rbs/environment_walker.rb#9 + def env; end + + # source://rbs/lib/rbs/environment_walker.rb#20 + def only_ancestors!(only = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/environment_walker.rb#25 + def only_ancestors?; end + + # source://rbs/lib/rbs/environment_walker.rb#44 + def tsort_each_child(node, &block); end + + # source://rbs/lib/rbs/environment_walker.rb#31 + def tsort_each_node(&block); end +end + +# source://rbs/lib/rbs/environment_walker.rb#5 +class RBS::EnvironmentWalker::InstanceNode < ::Struct + def type_name; end + def type_name=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rbs/lib/rbs/environment_walker.rb#6 +class RBS::EnvironmentWalker::SingletonNode < ::Struct + def type_name; end + def type_name=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rbs/lib/rbs/environment_walker.rb#7 +class RBS::EnvironmentWalker::TypeNameNode < ::Struct + def type_name; end + def type_name=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rbs/lib/rbs/factory.rb#4 +class RBS::Factory + # source://rbs/lib/rbs/factory.rb#5 + def type_name(string); end +end + +# source://rbs/lib/rbs/file_finder.rb#4 +module RBS::FileFinder + class << self + # source://rbs/lib/rbs/file_finder.rb#7 + def each_file(path, skip_hidden:, immediate: T.unsafe(nil), &block); end + end +end + +# source://rbs/lib/rbs/errors.rb#383 +class RBS::GenericParameterMismatchError < ::RBS::LoadingError + # @return [GenericParameterMismatchError] a new instance of GenericParameterMismatchError + # + # source://rbs/lib/rbs/errors.rb#387 + def initialize(name:, decl:); end + + # Returns the value of attribute decl. + # + # source://rbs/lib/rbs/errors.rb#385 + def decl; end + + # Returns the value of attribute name. + # + # source://rbs/lib/rbs/errors.rb#384 + def name; end +end + +# source://rbs/lib/rbs/errors.rb#529 +class RBS::InconsistentClassModuleAliasError < ::RBS::BaseError + include ::RBS::DetailedMessageable + + # @return [InconsistentClassModuleAliasError] a new instance of InconsistentClassModuleAliasError + # + # source://rbs/lib/rbs/errors.rb#534 + def initialize(entry); end + + # Returns the value of attribute alias_entry. + # + # source://rbs/lib/rbs/errors.rb#532 + def alias_entry; end + + # source://rbs/lib/rbs/errors.rb#548 + def location; end +end + +# source://rbs/lib/rbs/errors.rb#187 +class RBS::InheritModuleError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [InheritModuleError] a new instance of InheritModuleError + # + # source://rbs/lib/rbs/errors.rb#192 + def initialize(super_decl); end + + # source://rbs/lib/rbs/errors.rb#198 + def location; end + + # Returns the value of attribute super_decl. + # + # source://rbs/lib/rbs/errors.rb#190 + def super_decl; end + + class << self + # source://rbs/lib/rbs/errors.rb#202 + def check!(super_decl, env:); end + end +end + +# source://rbs/lib/rbs/errors.rb#354 +class RBS::InvalidOverloadMethodError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [InvalidOverloadMethodError] a new instance of InvalidOverloadMethodError + # + # source://rbs/lib/rbs/errors.rb#362 + def initialize(type_name:, method_name:, kind:, members:); end + + # Returns the value of attribute kind. + # + # source://rbs/lib/rbs/errors.rb#359 + def kind; end + + # source://rbs/lib/rbs/errors.rb#378 + def location; end + + # Returns the value of attribute members. + # + # source://rbs/lib/rbs/errors.rb#360 + def members; end + + # Returns the value of attribute method_name. + # + # source://rbs/lib/rbs/errors.rb#358 + def method_name; end + + # Returns the value of attribute type_name. + # + # source://rbs/lib/rbs/errors.rb#357 + def type_name; end +end + +# source://rbs/lib/rbs/errors.rb#67 +class RBS::InvalidTypeApplicationError < ::RBS::DefinitionError + # @return [InvalidTypeApplicationError] a new instance of InvalidTypeApplicationError + # + # source://rbs/lib/rbs/errors.rb#74 + def initialize(type_name:, args:, params:, location:); end + + # Returns the value of attribute args. + # + # source://rbs/lib/rbs/errors.rb#69 + def args; end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/errors.rb#72 + def location; end + + # Returns the value of attribute params. + # + # source://rbs/lib/rbs/errors.rb#70 + def params; end + + # Returns the value of attribute type_name. + # + # source://rbs/lib/rbs/errors.rb#68 + def type_name; end + + # Returns the value of attribute type_params. + # + # source://rbs/lib/rbs/errors.rb#71 + def type_params; end + + class << self + # source://rbs/lib/rbs/errors.rb#83 + def check!(type_name:, args:, params:, location:); end + + # source://rbs/lib/rbs/errors.rb#92 + def check2!(env:, type_name:, args:, location:); end + end +end + +# source://rbs/lib/rbs/errors.rb#407 +class RBS::InvalidVarianceAnnotationError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [InvalidVarianceAnnotationError] a new instance of InvalidVarianceAnnotationError + # + # source://rbs/lib/rbs/errors.rb#414 + def initialize(type_name:, param:, location:); end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/errors.rb#412 + def location; end + + # Returns the value of attribute param. + # + # source://rbs/lib/rbs/errors.rb#411 + def param; end + + # Returns the value of attribute type_name. + # + # source://rbs/lib/rbs/errors.rb#410 + def type_name; end +end + +# source://rbs/lib/rbs/errors.rb#20 +class RBS::LoadingError < ::RBS::BaseError; end + +# source://rbs/lib/rbs/location_aux.rb#4 +class RBS::Location + def initialize(_arg0, _arg1, _arg2); end + + # source://rbs/lib/rbs/location_aux.rb#71 + def ==(other); end + + def [](_arg0); end + def _add_optional_child(_arg0, _arg1, _arg2); end + def _add_optional_no_child(_arg0); end + def _add_required_child(_arg0, _arg1, _arg2); end + def _optional_keys; end + def _required_keys; end + + # source://rbs/lib/rbs/location_aux.rb#102 + def add_optional_child(name, range); end + + # source://rbs/lib/rbs/location_aux.rb#98 + def add_required_child(name, range); end + + def aref(_arg0); end + def buffer; end + + # source://rbs/lib/rbs/location_aux.rb#110 + def each_optional_key(&block); end + + # source://rbs/lib/rbs/location_aux.rb#118 + def each_required_key(&block); end + + # source://rbs/lib/rbs/location_aux.rb#47 + def end_column; end + + # source://rbs/lib/rbs/location_aux.rb#43 + def end_line; end + + # source://rbs/lib/rbs/location_aux.rb#55 + def end_loc; end + + def end_pos; end + + # source://rbs/lib/rbs/location_aux.rb#5 + def inspect; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/location_aux.rb#126 + def key?(name); end + + # source://rbs/lib/rbs/location_aux.rb#31 + def name; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/location_aux.rb#130 + def optional_key?(name); end + + # source://rbs/lib/rbs/location_aux.rb#59 + def range; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/location_aux.rb#134 + def required_key?(name); end + + # source://rbs/lib/rbs/location_aux.rb#63 + def source; end + + # source://rbs/lib/rbs/location_aux.rb#39 + def start_column; end + + # source://rbs/lib/rbs/location_aux.rb#35 + def start_line; end + + # source://rbs/lib/rbs/location_aux.rb#51 + def start_loc; end + + def start_pos; end + + # source://rbs/lib/rbs/location_aux.rb#78 + def to_json(state = T.unsafe(nil)); end + + # source://rbs/lib/rbs/location_aux.rb#67 + def to_s; end + + private + + def initialize_copy(_arg0); end + + class << self + # source://rbs/lib/rbs/location_aux.rb#16 + def new(buffer_ = T.unsafe(nil), start_pos_ = T.unsafe(nil), end_pos_ = T.unsafe(nil), buffer: T.unsafe(nil), start_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end + + # source://rbs/lib/rbs/location_aux.rb#94 + def to_string(location, default: T.unsafe(nil)); end + end +end + +# source://rbs/lib/rbs/location_aux.rb#29 +RBS::Location::WithChildren = RBS::Location + +# source://rbs/lib/rbs/locator.rb#4 +class RBS::Locator + # @return [Locator] a new instance of Locator + # + # source://rbs/lib/rbs/locator.rb#7 + def initialize(buffer:, dirs:, decls:); end + + # Returns the value of attribute buffer. + # + # source://rbs/lib/rbs/locator.rb#5 + def buffer; end + + # Returns the value of attribute decls. + # + # source://rbs/lib/rbs/locator.rb#5 + def decls; end + + # Returns the value of attribute dirs. + # + # source://rbs/lib/rbs/locator.rb#5 + def dirs; end + + # source://rbs/lib/rbs/locator.rb#13 + def find(line:, column:); end + + # source://rbs/lib/rbs/locator.rb#29 + def find2(line:, column:); end + + # source://rbs/lib/rbs/locator.rb#58 + def find_in_decl(pos, decl:, array:); end + + # source://rbs/lib/rbs/locator.rb#42 + def find_in_directive(pos, dir, array); end + + # source://rbs/lib/rbs/locator.rb#206 + def find_in_loc(pos, location:, array:); end + + # source://rbs/lib/rbs/locator.rb#129 + def find_in_member(pos, member:, array:); end + + # source://rbs/lib/rbs/locator.rb#152 + def find_in_method_type(pos, method_type:, array:); end + + # source://rbs/lib/rbs/locator.rb#190 + def find_in_type(pos, type:, array:); end + + # source://rbs/lib/rbs/locator.rb#170 + def find_in_type_param(pos, type_param:, array:); end + + # source://rbs/lib/rbs/locator.rb#233 + def test_loc(pos, location:); end +end + +# source://rbs/lib/rbs/errors.rb#4 +module RBS::MethodNameHelper + # source://rbs/lib/rbs/errors.rb#5 + def method_name_string; end +end + +# source://rbs/lib/rbs/method_type.rb#4 +class RBS::MethodType + # @return [MethodType] a new instance of MethodType + # + # source://rbs/lib/rbs/method_type.rb#10 + def initialize(type_params:, type:, block:, location:); end + + # source://rbs/lib/rbs/method_type.rb#17 + def ==(other); end + + # Returns the value of attribute block. + # + # source://rbs/lib/rbs/method_type.rb#7 + def block; end + + # source://rbs/lib/rbs/method_type.rb#84 + def each_type(&block); end + + # source://rbs/lib/rbs/method_type.rb#57 + def free_variables(set = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/method_type.rb#125 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/method_type.rb#121 + def has_self_type?; end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/method_type.rb#8 + def location; end + + # source://rbs/lib/rbs/method_type.rb#63 + def map_type(&block); end + + # source://rbs/lib/rbs/method_type.rb#72 + def map_type_bound(&block); end + + # source://rbs/lib/rbs/method_type.rb#33 + def sub(s); end + + # source://rbs/lib/rbs/method_type.rb#24 + def to_json(state = T.unsafe(nil)); end + + # source://rbs/lib/rbs/method_type.rb#98 + def to_s; end + + # Returns the value of attribute type. + # + # source://rbs/lib/rbs/method_type.rb#6 + def type; end + + # source://rbs/lib/rbs/method_type.rb#117 + def type_param_names; end + + # Returns the value of attribute type_params. + # + # source://rbs/lib/rbs/method_type.rb#5 + def type_params; end + + # source://rbs/lib/rbs/method_type.rb#48 + def update(type_params: T.unsafe(nil), type: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/method_type.rb#129 + def with_nonreturn_void?; end +end + +# source://rbs/lib/rbs/errors.rb#443 +class RBS::MixinClassError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [MixinClassError] a new instance of MixinClassError + # + # source://rbs/lib/rbs/errors.rb#449 + def initialize(type_name:, member:); end + + # source://rbs/lib/rbs/errors.rb#456 + def location; end + + # Returns the value of attribute member. + # + # source://rbs/lib/rbs/errors.rb#447 + def member; end + + # Returns the value of attribute type_name. + # + # source://rbs/lib/rbs/errors.rb#446 + def type_name; end + + private + + # source://rbs/lib/rbs/errors.rb#468 + def mixin_name; end + + class << self + # source://rbs/lib/rbs/errors.rb#460 + def check!(type_name:, env:, member:); end + end +end + +# source://rbs/lib/rbs/namespace.rb#4 +class RBS::Namespace + # @return [Namespace] a new instance of Namespace + # + # source://rbs/lib/rbs/namespace.rb#7 + def initialize(path:, absolute:); end + + # source://rbs/lib/rbs/namespace.rb#20 + def +(other); end + + # source://rbs/lib/rbs/namespace.rb#59 + def ==(other); end + + # source://rbs/lib/rbs/namespace.rb#47 + def absolute!; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/namespace.rb#39 + def absolute?; end + + # source://rbs/lib/rbs/namespace.rb#28 + def append(component); end + + # source://rbs/lib/rbs/namespace.rb#101 + def ascend; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/namespace.rb#55 + def empty?; end + + # source://rbs/lib/rbs/namespace.rb#59 + def eql?(other); end + + # source://rbs/lib/rbs/namespace.rb#65 + def hash; end + + # source://rbs/lib/rbs/namespace.rb#32 + def parent; end + + # Returns the value of attribute path. + # + # source://rbs/lib/rbs/namespace.rb#5 + def path; end + + # source://rbs/lib/rbs/namespace.rb#51 + def relative!; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/namespace.rb#43 + def relative?; end + + # source://rbs/lib/rbs/namespace.rb#69 + def split; end + + # source://rbs/lib/rbs/namespace.rb#75 + def to_s; end + + # source://rbs/lib/rbs/namespace.rb#84 + def to_type_name; end + + class << self + # source://rbs/lib/rbs/namespace.rb#12 + def empty; end + + # source://rbs/lib/rbs/namespace.rb#93 + def parse(string); end + + # source://rbs/lib/rbs/namespace.rb#16 + def root; end + end +end + +# source://rbs/lib/rbs/errors.rb#229 +class RBS::NoMixinFoundError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [NoMixinFoundError] a new instance of NoMixinFoundError + # + # source://rbs/lib/rbs/errors.rb#235 + def initialize(type_name:, member:); end + + # source://rbs/lib/rbs/errors.rb#242 + def location; end + + # Returns the value of attribute member. + # + # source://rbs/lib/rbs/errors.rb#233 + def member; end + + # Returns the value of attribute type_name. + # + # source://rbs/lib/rbs/errors.rb#232 + def type_name; end + + class << self + # source://rbs/lib/rbs/errors.rb#246 + def check!(type_name, env:, member:); end + end +end + +# source://rbs/lib/rbs/errors.rb#210 +class RBS::NoSelfTypeFoundError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [NoSelfTypeFoundError] a new instance of NoSelfTypeFoundError + # + # source://rbs/lib/rbs/errors.rb#216 + def initialize(type_name:, location:); end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/errors.rb#214 + def location; end + + # Returns the value of attribute type_name. + # + # source://rbs/lib/rbs/errors.rb#213 + def type_name; end + + class << self + # source://rbs/lib/rbs/errors.rb#223 + def check!(self_type, env:); end + end +end + +# source://rbs/lib/rbs/errors.rb#167 +class RBS::NoSuperclassFoundError < ::RBS::DefinitionError + # @return [NoSuperclassFoundError] a new instance of NoSuperclassFoundError + # + # source://rbs/lib/rbs/errors.rb#171 + def initialize(type_name:, location:); end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/errors.rb#169 + def location; end + + # Returns the value of attribute type_name. + # + # source://rbs/lib/rbs/errors.rb#168 + def type_name; end + + class << self + # source://rbs/lib/rbs/errors.rb#178 + def check!(type_name, env:, location:); end + end +end + +# source://rbs/lib/rbs/errors.rb#148 +class RBS::NoTypeFoundError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [NoTypeFoundError] a new instance of NoTypeFoundError + # + # source://rbs/lib/rbs/errors.rb#154 + def initialize(type_name:, location:); end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/errors.rb#152 + def location; end + + # Returns the value of attribute type_name. + # + # source://rbs/lib/rbs/errors.rb#151 + def type_name; end + + class << self + # source://rbs/lib/rbs/errors.rb#161 + def check!(type_name, env:, location:); end + end +end + +# source://rbs/lib/rbs/errors.rb#500 +class RBS::NonregularTypeAliasError < ::RBS::BaseError + include ::RBS::DetailedMessageable + + # @return [NonregularTypeAliasError] a new instance of NonregularTypeAliasError + # + # source://rbs/lib/rbs/errors.rb#506 + def initialize(diagnostic:, location:); end + + # Returns the value of attribute diagnostic. + # + # source://rbs/lib/rbs/errors.rb#503 + def diagnostic; end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/errors.rb#504 + def location; end +end + +# source://rbs/lib/rbs/parser/lex_result.rb#4 +class RBS::Parser + class << self + def _lex(_arg0, _arg1); end + def _parse_method_type(_arg0, _arg1, _arg2, _arg3, _arg4); end + def _parse_signature(_arg0, _arg1); end + def _parse_type(_arg0, _arg1, _arg2, _arg3, _arg4); end + + # source://rbs/lib/rbs/parser_aux.rb#34 + def buffer(source); end + + # source://rbs/lib/rbs/parser_aux.rb#25 + def lex(source); end + + # source://rbs/lib/rbs/parser_aux.rb#13 + def parse_method_type(source, range: T.unsafe(nil), variables: T.unsafe(nil), require_eof: T.unsafe(nil)); end + + # source://rbs/lib/rbs/parser_aux.rb#18 + def parse_signature(source); end + + # source://rbs/lib/rbs/parser_aux.rb#8 + def parse_type(source, range: T.unsafe(nil), variables: T.unsafe(nil), require_eof: T.unsafe(nil)); end + end +end + +# source://rbs/lib/rbs/parser_aux.rb#43 +RBS::Parser::KEYWORDS = T.let(T.unsafe(nil), Hash) + +# source://rbs/lib/rbs/parser/lex_result.rb#5 +class RBS::Parser::LexResult + # @return [LexResult] a new instance of LexResult + # + # source://rbs/lib/rbs/parser/lex_result.rb#9 + def initialize(buffer:, value:); end + + # Returns the value of attribute buffer. + # + # source://rbs/lib/rbs/parser/lex_result.rb#6 + def buffer; end + + # Returns the value of attribute value. + # + # source://rbs/lib/rbs/parser/lex_result.rb#7 + def value; end +end + +# source://rbs/lib/rbs/parser/token.rb#5 +class RBS::Parser::Token + # @return [Token] a new instance of Token + # + # source://rbs/lib/rbs/parser/token.rb#9 + def initialize(type:, location:); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/parser/token.rb#18 + def comment?; end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/parser/token.rb#7 + def location; end + + # Returns the value of attribute type. + # + # source://rbs/lib/rbs/parser/token.rb#6 + def type; end + + # source://rbs/lib/rbs/parser/token.rb#14 + def value; end +end + +# source://rbs/lib/rbs/errors.rb#51 +class RBS::ParsingError < ::RBS::BaseError + include ::RBS::DetailedMessageable + + # @return [ParsingError] a new instance of ParsingError + # + # source://rbs/lib/rbs/errors.rb#58 + def initialize(location, error_message, token_type); end + + # Returns the value of attribute error_message. + # + # source://rbs/lib/rbs/errors.rb#55 + def error_message; end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/errors.rb#54 + def location; end + + # Returns the value of attribute token_type. + # + # source://rbs/lib/rbs/errors.rb#56 + def token_type; end +end + +# source://rbs/lib/rbs/prototype/helpers.rb#4 +module RBS::Prototype; end + +# source://rbs/lib/rbs/prototype/helpers.rb#5 +module RBS::Prototype::Helpers + private + + # @return [Boolean] + # + # source://rbs/lib/rbs/prototype/helpers.rb#96 + def any_node?(node, nodes: T.unsafe(nil), &block); end + + # NOTE: args_node may be a nil by a bug + # https://bugs.ruby-lang.org/issues/17495 + # + # source://rbs/lib/rbs/prototype/helpers.rb#120 + def args_from_node(args_node); end + + # source://rbs/lib/rbs/prototype/helpers.rb#8 + def block_from_body(node); end + + # source://rbs/lib/rbs/prototype/helpers.rb#84 + def each_child(node, &block); end + + # source://rbs/lib/rbs/prototype/helpers.rb#88 + def each_node(nodes); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/prototype/helpers.rb#108 + def keyword_hash?(node); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/prototype/helpers.rb#124 + def symbol_literal_node?(node); end + + # source://rbs/lib/rbs/prototype/helpers.rb#135 + def untyped; end +end + +# source://rbs/lib/rbs/prototype/node_usage.rb#5 +class RBS::Prototype::NodeUsage + include ::RBS::Prototype::Helpers + + # @return [NodeUsage] a new instance of NodeUsage + # + # source://rbs/lib/rbs/prototype/node_usage.rb#10 + def initialize(node); end + + # source://rbs/lib/rbs/prototype/node_usage.rb#25 + def calculate(node, conditional:); end + + # Returns the value of attribute conditional_nodes. + # + # source://rbs/lib/rbs/prototype/node_usage.rb#8 + def conditional_nodes; end + + # source://rbs/lib/rbs/prototype/node_usage.rb#17 + def each_conditional_node(&block); end +end + +# source://rbs/lib/rbs/prototype/rb.rb#5 +class RBS::Prototype::RB + include ::RBS::Prototype::Helpers + + # @return [RB] a new instance of RB + # + # source://rbs/lib/rbs/prototype/rb.rb#45 + def initialize; end + + # source://rbs/lib/rbs/prototype/rb.rb#556 + def block_type(node); end + + # source://rbs/lib/rbs/prototype/rb.rb#536 + def body_type(node); end + + # source://rbs/lib/rbs/prototype/rb.rb#451 + def const_to_name(node, context:); end + + # source://rbs/lib/rbs/prototype/rb.rb#432 + def const_to_name!(node); end + + # source://rbs/lib/rbs/prototype/rb.rb#764 + def current_accessibility(decls, index = T.unsafe(nil)); end + + # source://rbs/lib/rbs/prototype/rb.rb#49 + def decls; end + + # source://rbs/lib/rbs/prototype/rb.rb#804 + def find_def_index_by_name(decls, name); end + + # source://rbs/lib/rbs/prototype/rb.rb#531 + def function_return_type_from_body(node); end + + # source://rbs/lib/rbs/prototype/rb.rb#473 + def function_type_from_body(node, def_name); end + + # source://rbs/lib/rbs/prototype/rb.rb#549 + def if_unless_type(node); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/prototype/rb.rb#800 + def is_accessibility?(decl); end + + # source://rbs/lib/rbs/prototype/rb.rb#462 + def literal_to_symbol(node); end + + # source://rbs/lib/rbs/prototype/rb.rb#570 + def literal_to_type(node); end + + # backward compatible + # + # source://rbs/lib/rbs/prototype/rb.rb#711 + def node_type(node, default: T.unsafe(nil)); end + + # source://rbs/lib/rbs/prototype/rb.rb#711 + def param_type(node, default: T.unsafe(nil)); end + + # source://rbs/lib/rbs/prototype/rb.rb#75 + def parse(string); end + + # source://rbs/lib/rbs/prototype/rb.rb#756 + def private; end + + # source://rbs/lib/rbs/prototype/rb.rb#107 + def process(node, decls:, comments:, context:); end + + # source://rbs/lib/rbs/prototype/rb.rb#426 + def process_children(node, decls:, comments:, context:); end + + # source://rbs/lib/rbs/prototype/rb.rb#760 + def public; end + + # source://rbs/lib/rbs/prototype/rb.rb#691 + def range_element_type(types); end + + # source://rbs/lib/rbs/prototype/rb.rb#774 + def remove_unnecessary_accessibility_methods!(decls); end + + # source://rbs/lib/rbs/prototype/rb.rb#822 + def sort_members!(decls); end + + # Returns the value of attribute source_decls. + # + # source://rbs/lib/rbs/prototype/rb.rb#42 + def source_decls; end + + # Returns the value of attribute toplevel_members. + # + # source://rbs/lib/rbs/prototype/rb.rb#43 + def toplevel_members; end + + # source://rbs/lib/rbs/prototype/rb.rb#680 + def types_to_union_type(types); end +end + +# source://rbs/lib/rbs/prototype/rb.rb#8 +class RBS::Prototype::RB::Context < ::Struct + # source://rbs/lib/rbs/prototype/rb.rb#25 + def attribute_kind; end + + # source://rbs/lib/rbs/prototype/rb.rb#33 + def enter_namespace(namespace); end + + # source://rbs/lib/rbs/prototype/rb.rb#15 + def method_kind; end + + # source://rbs/lib/rbs/prototype/rb.rb#37 + def update(module_function: T.unsafe(nil), singleton: T.unsafe(nil), in_def: T.unsafe(nil)); end + + class << self + # source://rbs/lib/rbs/prototype/rb.rb#11 + def initial(namespace: T.unsafe(nil)); end + end +end + +# source://rbs/lib/rbs/prototype/rbi.rb#5 +class RBS::Prototype::RBI + include ::RBS::Prototype::Helpers + + # @return [RBI] a new instance of RBI + # + # source://rbs/lib/rbs/prototype/rbi.rb#12 + def initialize; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/prototype/rbi.rb#557 + def call_node?(node, name:, receiver: T.unsafe(nil), args: T.unsafe(nil)); end + + # source://rbs/lib/rbs/prototype/rbi.rb#561 + def const_to_name(node); end + + # source://rbs/lib/rbs/prototype/rbi.rb#92 + def current_module; end + + # source://rbs/lib/rbs/prototype/rbi.rb#96 + def current_module!; end + + # source://rbs/lib/rbs/prototype/rbi.rb#48 + def current_namespace; end + + # Returns the value of attribute decls. + # + # source://rbs/lib/rbs/prototype/rbi.rb#8 + def decls; end + + # source://rbs/lib/rbs/prototype/rbi.rb#597 + def each_arg(array, &block); end + + # source://rbs/lib/rbs/prototype/rbi.rb#611 + def each_child(node); end + + # source://rbs/lib/rbs/prototype/rbi.rb#114 + def join_comments(nodes, comments); end + + # Returns the value of attribute last_sig. + # + # source://rbs/lib/rbs/prototype/rbi.rb#10 + def last_sig; end + + # source://rbs/lib/rbs/prototype/rbi.rb#281 + def method_type(args_node, type_node, variables:, overloads:); end + + # Returns the value of attribute modules. + # + # source://rbs/lib/rbs/prototype/rbi.rb#9 + def modules; end + + # source://rbs/lib/rbs/prototype/rbi.rb#44 + def nested_name(name); end + + # source://rbs/lib/rbs/prototype/rbi.rb#619 + def node_to_hash(node); end + + # source://rbs/lib/rbs/prototype/rbi.rb#18 + def parse(string); end + + # source://rbs/lib/rbs/prototype/rbi.rb#347 + def parse_params(args_node, args, method_type, variables:, overloads:); end + + # source://rbs/lib/rbs/prototype/rbi.rb#108 + def pop_sig; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/prototype/rbi.rb#549 + def proc_type?(type_node); end + + # source://rbs/lib/rbs/prototype/rbi.rb#119 + def process(node, comments:, outer: T.unsafe(nil)); end + + # source://rbs/lib/rbs/prototype/rbi.rb#54 + def push_class(name, super_class, comment:); end + + # source://rbs/lib/rbs/prototype/rbi.rb#73 + def push_module(name, comment:); end + + # source://rbs/lib/rbs/prototype/rbi.rb#100 + def push_sig(node); end + + # source://rbs/lib/rbs/prototype/rbi.rb#472 + def type_of(type_node, variables:); end + + # source://rbs/lib/rbs/prototype/rbi.rb#485 + def type_of0(type_node, variables:); end +end + +# source://rbs/lib/rbs/prototype/runtime/helpers.rb#5 +class RBS::Prototype::Runtime + include ::RBS::Prototype::Helpers + include ::RBS::Prototype::Runtime::Helpers + + # @return [Runtime] a new instance of Runtime + # + # source://rbs/lib/rbs/prototype/runtime.rb#70 + def initialize(patterns:, env:, merge:, todo: T.unsafe(nil), owners_included: T.unsafe(nil)); end + + # source://rbs/lib/rbs/prototype/runtime.rb#650 + def block_from_ast_of(method); end + + # source://rbs/lib/rbs/prototype/runtime.rb#100 + def builder; end + + # source://rbs/lib/rbs/prototype/runtime.rb#108 + def decls; end + + # Generate/find outer module declarations + # This is broken down into another method to comply with `DRY` + # This generates/finds declarations in nested form & returns the last array of declarations + # + # source://rbs/lib/rbs/prototype/runtime.rb#579 + def ensure_outer_module_declarations(mod); end + + # Returns the value of attribute env. + # + # source://rbs/lib/rbs/prototype/runtime.rb#64 + def env; end + + # source://rbs/lib/rbs/prototype/runtime.rb#484 + def generate_class(mod); end + + # source://rbs/lib/rbs/prototype/runtime.rb#422 + def generate_constants(mod, decls); end + + # source://rbs/lib/rbs/prototype/runtime.rb#298 + def generate_methods(mod, module_name, members); end + + # source://rbs/lib/rbs/prototype/runtime.rb#561 + def generate_mixin(mod, decl, type_name, type_name_absolute); end + + # source://rbs/lib/rbs/prototype/runtime.rb#523 + def generate_module(mod); end + + # source://rbs/lib/rbs/prototype/runtime.rb#469 + def generate_super_class(mod); end + + # Returns the value of attribute merge. + # + # source://rbs/lib/rbs/prototype/runtime.rb#65 + def merge; end + + # source://rbs/lib/rbs/prototype/runtime.rb#239 + def merge_rbs(module_name, members, instance: T.unsafe(nil), singleton: T.unsafe(nil)); end + + # source://rbs/lib/rbs/prototype/runtime.rb#170 + def method_type(method); end + + # Returns the value of attribute outline. + # + # source://rbs/lib/rbs/prototype/runtime.rb#68 + def outline; end + + # Sets the attribute outline + # + # @param value the value to set the attribute outline to. + # + # source://rbs/lib/rbs/prototype/runtime.rb#68 + def outline=(_arg0); end + + # Returns the value of attribute owners_included. + # + # source://rbs/lib/rbs/prototype/runtime.rb#67 + def owners_included; end + + # source://rbs/lib/rbs/prototype/runtime.rb#104 + def parse(file); end + + # Returns the value of attribute patterns. + # + # source://rbs/lib/rbs/prototype/runtime.rb#63 + def patterns; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/prototype/runtime.rb#83 + def target?(const); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/prototype/runtime.rb#285 + def target_method?(mod, instance: T.unsafe(nil), singleton: T.unsafe(nil)); end + + # Returns the value of attribute todo. + # + # source://rbs/lib/rbs/prototype/runtime.rb#66 + def todo; end + + # source://rbs/lib/rbs/prototype/runtime.rb#96 + def todo_object; end + + # source://rbs/lib/rbs/prototype/runtime.rb#633 + def type_args(type_name); end + + # source://rbs/lib/rbs/prototype/runtime.rb#641 + def type_params(mod); end + + private + + # @return [Boolean] + # + # source://rbs/lib/rbs/prototype/runtime.rb#412 + def can_alias?(mod, method); end + + # source://rbs/lib/rbs/prototype/runtime.rb#128 + def each_mixined_module(type_name, mod); end + + # source://rbs/lib/rbs/prototype/runtime.rb#137 + def each_mixined_module_one(type_name, mod); end +end + +# source://rbs/lib/rbs/prototype/runtime/value_object_generator.rb#211 +class RBS::Prototype::Runtime::DataGenerator < ::RBS::Prototype::Runtime::ValueObjectBase + private + + # source://rbs/lib/rbs/prototype/runtime/value_object_generator.rb#227 + def add_decl_members(decl); end + + # def self.new: (untyped foo, untyped bar) -> instance + # | (foo: untyped, bar: untyped) -> instance + # + # source://rbs/lib/rbs/prototype/runtime/value_object_generator.rb#235 + def build_s_new; end + + # source://rbs/lib/rbs/prototype/runtime/value_object_generator.rb#223 + def build_super_class; end + + class << self + # @return [Boolean] + # + # source://rbs/lib/rbs/prototype/runtime/value_object_generator.rb#212 + def generatable?(target); end + end +end + +# source://rbs/lib/rbs/prototype/runtime/helpers.rb#6 +module RBS::Prototype::Runtime::Helpers + private + + # source://rbs/lib/rbs/prototype/runtime/helpers.rb#19 + def const_name(const); end + + # source://rbs/lib/rbs/prototype/runtime/helpers.rb#15 + def const_name!(const); end + + # Returns the exact name & not compactly declared name + # + # source://rbs/lib/rbs/prototype/runtime/helpers.rb#10 + def only_name(mod); end + + # source://rbs/lib/rbs/prototype/runtime/helpers.rb#37 + def to_type_name(name, full_name: T.unsafe(nil)); end + + # source://rbs/lib/rbs/prototype/runtime/helpers.rb#53 + def untyped; end +end + +# source://rbs/lib/rbs/prototype/runtime/reflection.rb#6 +module RBS::Prototype::Runtime::Reflection + class << self + # source://rbs/lib/rbs/prototype/runtime/reflection.rb#12 + def constants_of(mod, inherit = T.unsafe(nil)); end + + # source://rbs/lib/rbs/prototype/runtime/reflection.rb#7 + def object_class(value); end + end +end + +# source://rbs/lib/rbs/prototype/runtime/value_object_generator.rb#89 +class RBS::Prototype::Runtime::StructGenerator < ::RBS::Prototype::Runtime::ValueObjectBase + private + + # source://rbs/lib/rbs/prototype/runtime/value_object_generator.rb#106 + def add_decl_members(decl); end + + # source://rbs/lib/rbs/prototype/runtime/value_object_generator.rb#163 + def build_overload_for_keyword_arguments; end + + # source://rbs/lib/rbs/prototype/runtime/value_object_generator.rb#149 + def build_overload_for_positional_arguments; end + + # def self.keyword_init?: () -> bool? + # + # source://rbs/lib/rbs/prototype/runtime/value_object_generator.rb#178 + def build_s_keyword_init_p; end + + # def self.new: (?untyped foo, ?untyped bar) -> instance + # | (?foo: untyped, ?bar: untyped) -> instance + # + # source://rbs/lib/rbs/prototype/runtime/value_object_generator.rb#115 + def build_s_new; end + + # source://rbs/lib/rbs/prototype/runtime/value_object_generator.rb#102 + def build_super_class; end + + class << self + # @return [Boolean] + # + # source://rbs/lib/rbs/prototype/runtime/value_object_generator.rb#90 + def generatable?(target); end + end +end + +# source://rbs/lib/rbs/prototype/runtime/value_object_generator.rb#100 +RBS::Prototype::Runtime::StructGenerator::CAN_CALL_KEYWORD_INIT_P = T.let(T.unsafe(nil), TrueClass) + +# source://rbs/lib/rbs/prototype/runtime.rb#10 +class RBS::Prototype::Runtime::Todo + # @return [Todo] a new instance of Todo + # + # source://rbs/lib/rbs/prototype/runtime.rb#11 + def initialize(builder:); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/prototype/runtime.rb#42 + def skip_constant?(module_name:, name:); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/prototype/runtime.rb#33 + def skip_instance_method?(module_name:, method:, accessibility:); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/prototype/runtime.rb#15 + def skip_mixin?(type_name:, module_name:, mixin_class:); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/prototype/runtime.rb#24 + def skip_singleton_method?(module_name:, method:, accessibility:); end + + private + + # source://rbs/lib/rbs/prototype/runtime.rb#49 + def mixin_decls(type_name); end +end + +# source://rbs/lib/rbs/prototype/runtime/value_object_generator.rb#8 +class RBS::Prototype::Runtime::ValueObjectBase + include ::RBS::Prototype::Runtime::Helpers + + # @return [ValueObjectBase] a new instance of ValueObjectBase + # + # source://rbs/lib/rbs/prototype/runtime/value_object_generator.rb#11 + def initialize(target_class); end + + # source://rbs/lib/rbs/prototype/runtime/value_object_generator.rb#15 + def build_decl; end + + private + + # attr_accessor foo: untyped + # + # source://rbs/lib/rbs/prototype/runtime/value_object_generator.rb#74 + def build_member_accessors(ast_members_class); end + + # def self.members: () -> [ :foo, :bar ] + # def members: () -> [ :foo, :bar ] + # + # source://rbs/lib/rbs/prototype/runtime/value_object_generator.rb#35 + def build_s_members; end +end + +# source://rbs/lib/rdoc_plugin/parser.rb#6 +module RBS::RDocPlugin; end + +# source://rbs/lib/rdoc_plugin/parser.rb#7 +class RBS::RDocPlugin::Parser + # @return [Parser] a new instance of Parser + # + # source://rbs/lib/rdoc_plugin/parser.rb#11 + def initialize(top_level, content); end + + # Returns the value of attribute content. + # + # source://rbs/lib/rdoc_plugin/parser.rb#9 + def content; end + + # Sets the attribute content + # + # @param value the value to set the attribute content to. + # + # source://rbs/lib/rdoc_plugin/parser.rb#9 + def content=(_arg0); end + + # source://rbs/lib/rdoc_plugin/parser.rb#94 + def parse_attr_decl(decl:, context:, outer_name: T.unsafe(nil)); end + + # source://rbs/lib/rdoc_plugin/parser.rb#53 + def parse_class_decl(decl:, context:, outer_name: T.unsafe(nil)); end + + # source://rbs/lib/rdoc_plugin/parser.rb#67 + def parse_constant_decl(decl:, context:, outer_name: T.unsafe(nil)); end + + # source://rbs/lib/rdoc_plugin/parser.rb#125 + def parse_extend_decl(decl:, context:, outer_name: T.unsafe(nil)); end + + # source://rbs/lib/rdoc_plugin/parser.rb#109 + def parse_include_decl(decl:, context:, outer_name: T.unsafe(nil)); end + + # source://rbs/lib/rdoc_plugin/parser.rb#24 + def parse_member(decl:, context:, outer_name: T.unsafe(nil)); end + + # source://rbs/lib/rdoc_plugin/parser.rb#88 + def parse_method_alias_decl(decl:, context:, outer_name: T.unsafe(nil)); end + + # source://rbs/lib/rdoc_plugin/parser.rb#73 + def parse_method_decl(decl:, context:, outer_name: T.unsafe(nil)); end + + # source://rbs/lib/rdoc_plugin/parser.rb#60 + def parse_module_decl(decl:, context:, outer_name: T.unsafe(nil)); end + + # source://rbs/lib/rdoc_plugin/parser.rb#16 + def scan; end + + # Returns the value of attribute top_level. + # + # source://rbs/lib/rdoc_plugin/parser.rb#9 + def top_level; end + + # Sets the attribute top_level + # + # @param value the value to set the attribute top_level to. + # + # source://rbs/lib/rdoc_plugin/parser.rb#9 + def top_level=(_arg0); end + + private + + # source://rbs/lib/rdoc_plugin/parser.rb#149 + def comment_string(with_comment); end + + # source://rbs/lib/rdoc_plugin/parser.rb#143 + def construct_comment(context:, comment:); end + + # source://rbs/lib/rdoc_plugin/parser.rb#154 + def fully_qualified_name(outer_name:, decl:); end +end + +# source://rbs/lib/rbs/errors.rb#423 +class RBS::RecursiveAliasDefinitionError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [RecursiveAliasDefinitionError] a new instance of RecursiveAliasDefinitionError + # + # source://rbs/lib/rbs/errors.rb#429 + def initialize(type:, defs:); end + + # Returns the value of attribute defs. + # + # source://rbs/lib/rbs/errors.rb#427 + def defs; end + + # source://rbs/lib/rbs/errors.rb#436 + def location; end + + # Returns the value of attribute type. + # + # source://rbs/lib/rbs/errors.rb#426 + def type; end +end + +# source://rbs/lib/rbs/errors.rb#110 +class RBS::RecursiveAncestorError < ::RBS::DefinitionError + # @return [RecursiveAncestorError] a new instance of RecursiveAncestorError + # + # source://rbs/lib/rbs/errors.rb#114 + def initialize(ancestors:, location:); end + + # Returns the value of attribute ancestors. + # + # source://rbs/lib/rbs/errors.rb#111 + def ancestors; end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/errors.rb#112 + def location; end + + class << self + # source://rbs/lib/rbs/errors.rb#134 + def check!(self_ancestor, ancestors:, location:); end + end +end + +# source://rbs/lib/rbs/errors.rb#482 +class RBS::RecursiveTypeAliasError < ::RBS::BaseError + include ::RBS::DetailedMessageable + + # @return [RecursiveTypeAliasError] a new instance of RecursiveTypeAliasError + # + # source://rbs/lib/rbs/errors.rb#488 + def initialize(alias_names:, location:); end + + # Returns the value of attribute alias_names. + # + # source://rbs/lib/rbs/errors.rb#485 + def alias_names; end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/errors.rb#486 + def location; end + + # source://rbs/lib/rbs/errors.rb#495 + def name; end +end + +# source://rbs/lib/rbs/repository.rb#4 +class RBS::Repository + # @return [Repository] a new instance of Repository + # + # source://rbs/lib/rbs/repository.rb#74 + def initialize(no_stdlib: T.unsafe(nil)); end + + # source://rbs/lib/rbs/repository.rb#98 + def add(dir); end + + # Returns the value of attribute dirs. + # + # source://rbs/lib/rbs/repository.rb#71 + def dirs; end + + # Returns the value of attribute gems. + # + # source://rbs/lib/rbs/repository.rb#72 + def gems; end + + # source://rbs/lib/rbs/repository.rb#108 + def lookup(gem, version); end + + # source://rbs/lib/rbs/repository.rb#113 + def lookup_path(gem, version); end + + class << self + # source://rbs/lib/rbs/repository.rb#83 + def default; end + + # source://rbs/lib/rbs/repository.rb#87 + def find_best_version(version, candidates); end + end +end + +# source://rbs/lib/rbs/repository.rb#5 +RBS::Repository::DEFAULT_STDLIB_ROOT = T.let(T.unsafe(nil), Pathname) + +# source://rbs/lib/rbs/repository.rb#7 +class RBS::Repository::GemRBS + # @return [GemRBS] a new instance of GemRBS + # + # source://rbs/lib/rbs/repository.rb#11 + def initialize(name:); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/repository.rb#64 + def empty?; end + + # source://rbs/lib/rbs/repository.rb#59 + def find_best_version(version); end + + # source://rbs/lib/rbs/repository.rb#54 + def latest_version; end + + # source://rbs/lib/rbs/repository.rb#22 + def load!; end + + # Returns the value of attribute name. + # + # source://rbs/lib/rbs/repository.rb#8 + def name; end + + # source://rbs/lib/rbs/repository.rb#49 + def oldest_version; end + + # Returns the value of attribute paths. + # + # source://rbs/lib/rbs/repository.rb#9 + def paths; end + + # source://rbs/lib/rbs/repository.rb#45 + def version_names; end + + # source://rbs/lib/rbs/repository.rb#17 + def versions; end +end + +# source://rbs/lib/rbs/repository.rb#69 +class RBS::Repository::VersionPath < ::Struct + def gem; end + def gem=(_); end + def path; end + def path=(_); end + def version; end + def version=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rbs/lib/rbs/resolver/constant_resolver.rb#4 +module RBS::Resolver; end + +# source://rbs/lib/rbs/resolver/constant_resolver.rb#5 +class RBS::Resolver::ConstantResolver + # @return [ConstantResolver] a new instance of ConstantResolver + # + # source://rbs/lib/rbs/resolver/constant_resolver.rb#88 + def initialize(builder:); end + + # Returns the value of attribute builder. + # + # source://rbs/lib/rbs/resolver/constant_resolver.rb#85 + def builder; end + + # Returns the value of attribute child_constants_cache. + # + # source://rbs/lib/rbs/resolver/constant_resolver.rb#86 + def child_constants_cache; end + + # source://rbs/lib/rbs/resolver/constant_resolver.rb#112 + def children(module_name); end + + # source://rbs/lib/rbs/resolver/constant_resolver.rb#100 + def constants(context); end + + # source://rbs/lib/rbs/resolver/constant_resolver.rb#178 + def constants_from_ancestors(module_name, constants:); end + + # source://rbs/lib/rbs/resolver/constant_resolver.rb#163 + def constants_from_context(context, constants:); end + + # source://rbs/lib/rbs/resolver/constant_resolver.rb#201 + def constants_itself(context, constants:); end + + # Returns the value of attribute context_constants_cache. + # + # source://rbs/lib/rbs/resolver/constant_resolver.rb#86 + def context_constants_cache; end + + # source://rbs/lib/rbs/resolver/constant_resolver.rb#138 + def load_child_constants(name); end + + # source://rbs/lib/rbs/resolver/constant_resolver.rb#122 + def load_context_constants(context); end + + # source://rbs/lib/rbs/resolver/constant_resolver.rb#95 + def resolve(name, context:); end + + # source://rbs/lib/rbs/resolver/constant_resolver.rb#108 + def resolve_child(module_name, name); end + + # Returns the value of attribute table. + # + # source://rbs/lib/rbs/resolver/constant_resolver.rb#85 + def table; end +end + +# source://rbs/lib/rbs/resolver/constant_resolver.rb#6 +class RBS::Resolver::ConstantResolver::Table + # @return [Table] a new instance of Table + # + # source://rbs/lib/rbs/resolver/constant_resolver.rb#10 + def initialize(environment); end + + # source://rbs/lib/rbs/resolver/constant_resolver.rb#63 + def children(name); end + + # Returns the value of attribute children_table. + # + # source://rbs/lib/rbs/resolver/constant_resolver.rb#7 + def children_table; end + + # source://rbs/lib/rbs/resolver/constant_resolver.rb#67 + def constant(name); end + + # source://rbs/lib/rbs/resolver/constant_resolver.rb#80 + def constant_of_constant(name, entry); end + + # source://rbs/lib/rbs/resolver/constant_resolver.rb#71 + def constant_of_module(name, entry); end + + # Returns the value of attribute constants_table. + # + # source://rbs/lib/rbs/resolver/constant_resolver.rb#8 + def constants_table; end + + # Returns the value of attribute toplevel. + # + # source://rbs/lib/rbs/resolver/constant_resolver.rb#7 + def toplevel; end +end + +# source://rbs/lib/rbs/resolver/type_name_resolver.rb#5 +class RBS::Resolver::TypeNameResolver + # @return [TypeNameResolver] a new instance of TypeNameResolver + # + # source://rbs/lib/rbs/resolver/type_name_resolver.rb#10 + def initialize(env); end + + # Returns the value of attribute all_names. + # + # source://rbs/lib/rbs/resolver/type_name_resolver.rb#6 + def all_names; end + + # Returns the value of attribute cache. + # + # source://rbs/lib/rbs/resolver/type_name_resolver.rb#7 + def cache; end + + # Returns the value of attribute env. + # + # source://rbs/lib/rbs/resolver/type_name_resolver.rb#8 + def env; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/resolver/type_name_resolver.rb#84 + def has_name?(full_name); end + + # source://rbs/lib/rbs/resolver/type_name_resolver.rb#51 + def partition(type_name); end + + # source://rbs/lib/rbs/resolver/type_name_resolver.rb#28 + def resolve(type_name, context:); end + + # source://rbs/lib/rbs/resolver/type_name_resolver.rb#69 + def resolve_in(head, context); end + + # source://rbs/lib/rbs/resolver/type_name_resolver.rb#21 + def try_cache(query); end +end + +# source://rbs/lib/rbs/substitution.rb#4 +class RBS::Substitution + # @return [Substitution] a new instance of Substitution + # + # source://rbs/lib/rbs/substitution.rb#12 + def initialize; end + + # source://rbs/lib/rbs/substitution.rb#66 + def +(other); end + + # source://rbs/lib/rbs/substitution.rb#37 + def [](ty); end + + # source://rbs/lib/rbs/substitution.rb#16 + def add(from:, to:); end + + # source://rbs/lib/rbs/substitution.rb#37 + def apply(ty); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/substitution.rb#8 + def empty?; end + + # Returns the value of attribute instance_type. + # + # source://rbs/lib/rbs/substitution.rb#6 + def instance_type; end + + # Sets the attribute instance_type + # + # @param value the value to set the attribute instance_type to. + # + # source://rbs/lib/rbs/substitution.rb#6 + def instance_type=(_arg0); end + + # Returns the value of attribute mapping. + # + # source://rbs/lib/rbs/substitution.rb#5 + def mapping; end + + # source://rbs/lib/rbs/substitution.rb#55 + def without(*vars); end + + class << self + # source://rbs/lib/rbs/substitution.rb#20 + def build(variables, types, instance_type: T.unsafe(nil), &block); end + end +end + +# source://rbs/lib/rbs/subtractor.rb#4 +class RBS::Subtractor + # @return [Subtractor] a new instance of Subtractor + # + # source://rbs/lib/rbs/subtractor.rb#5 + def initialize(minuend, subtrahend); end + + # source://rbs/lib/rbs/subtractor.rb#10 + def call(minuend = T.unsafe(nil), context: T.unsafe(nil)); end + + private + + # source://rbs/lib/rbs/subtractor.rb#177 + def absolute_typename(name, context:); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/subtractor.rb#160 + def access_modifier?(decl); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/subtractor.rb#118 + def cvar_exist?(owner, name); end + + # source://rbs/lib/rbs/subtractor.rb#127 + def each_member(owner, &block); end + + # source://rbs/lib/rbs/subtractor.rb#48 + def filter_members(decl, context:); end + + # source://rbs/lib/rbs/subtractor.rb#148 + def filter_redundunt_access_modifiers(decls); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/subtractor.rb#106 + def ivar_exist?(owner, name, kind); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/subtractor.rb#60 + def member_exist?(owner, member, context:); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/subtractor.rb#89 + def method_exist?(owner, method_name, kind); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/subtractor.rb#137 + def mixin_exist?(owner, mixin, context:); end + + # source://rbs/lib/rbs/subtractor.rb#186 + def typename_candidates(name, context:); end + + # source://rbs/lib/rbs/subtractor.rb#164 + def update_decl(decl, members:); end +end + +# source://rbs/lib/rbs/errors.rb#343 +class RBS::SuperclassMismatchError < ::RBS::DefinitionError + # @return [SuperclassMismatchError] a new instance of SuperclassMismatchError + # + # source://rbs/lib/rbs/errors.rb#347 + def initialize(name:, entry:); end + + # Returns the value of attribute entry. + # + # source://rbs/lib/rbs/errors.rb#345 + def entry; end + + # Returns the value of attribute name. + # + # source://rbs/lib/rbs/errors.rb#344 + def name; end +end + +# source://rbs/lib/rbs/type_alias_dependency.rb#4 +class RBS::TypeAliasDependency + # @return [TypeAliasDependency] a new instance of TypeAliasDependency + # + # source://rbs/lib/rbs/type_alias_dependency.rb#14 + def initialize(env:); end + + # source://rbs/lib/rbs/type_alias_dependency.rb#27 + def build_dependencies; end + + # Check if an alias type definition is circular & prohibited + # + # @return [Boolean] + # + # source://rbs/lib/rbs/type_alias_dependency.rb#19 + def circular_definition?(alias_name); end + + # A hash which stores the transitive closure + # of the directed graph + # + # source://rbs/lib/rbs/type_alias_dependency.rb#12 + def dependencies; end + + # source://rbs/lib/rbs/type_alias_dependency.rb#57 + def dependencies_of(name); end + + # Direct dependencies corresponds to a directed graph + # with vertices as types and directions based on assignment of types + # + # source://rbs/lib/rbs/type_alias_dependency.rb#9 + def direct_dependencies; end + + # source://rbs/lib/rbs/type_alias_dependency.rb#52 + def direct_dependencies_of(name); end + + # Returns the value of attribute env. + # + # source://rbs/lib/rbs/type_alias_dependency.rb#5 + def env; end + + # source://rbs/lib/rbs/type_alias_dependency.rb#43 + def transitive_closure; end + + private + + # Recursive function to construct transitive closure + # + # source://rbs/lib/rbs/type_alias_dependency.rb#81 + def dependency(start, vertex, nested = T.unsafe(nil)); end + + # Constructs directed graph recursively + # + # source://rbs/lib/rbs/type_alias_dependency.rb#65 + def direct_dependency(type, result = T.unsafe(nil)); end +end + +# source://rbs/lib/rbs/type_alias_regularity.rb#4 +class RBS::TypeAliasRegularity + # @return [TypeAliasRegularity] a new instance of TypeAliasRegularity + # + # source://rbs/lib/rbs/type_alias_regularity.rb#16 + def initialize(env:); end + + # source://rbs/lib/rbs/type_alias_regularity.rb#61 + def build_alias_type(name); end + + # Returns the value of attribute builder. + # + # source://rbs/lib/rbs/type_alias_regularity.rb#14 + def builder; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/type_alias_regularity.rb#69 + def compatible_args?(args1, args2); end + + # Returns the value of attribute diagnostics. + # + # source://rbs/lib/rbs/type_alias_regularity.rb#14 + def diagnostics; end + + # source://rbs/lib/rbs/type_alias_regularity.rb#110 + def each_alias_type(type, &block); end + + # source://rbs/lib/rbs/type_alias_regularity.rb#83 + def each_mutual_alias_defs(&block); end + + # Returns the value of attribute env. + # + # source://rbs/lib/rbs/type_alias_regularity.rb#14 + def env; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/type_alias_regularity.rb#79 + def nonregular?(type_name); end + + # source://rbs/lib/rbs/type_alias_regularity.rb#22 + def validate; end + + # source://rbs/lib/rbs/type_alias_regularity.rb#39 + def validate_alias_type(alias_type, names, types); end + + class << self + # source://rbs/lib/rbs/type_alias_regularity.rb#120 + def validate(env:); end + end +end + +# source://rbs/lib/rbs/type_alias_regularity.rb#5 +class RBS::TypeAliasRegularity::Diagnostic + # @return [Diagnostic] a new instance of Diagnostic + # + # source://rbs/lib/rbs/type_alias_regularity.rb#8 + def initialize(type_name:, nonregular_type:); end + + # Returns the value of attribute nonregular_type. + # + # source://rbs/lib/rbs/type_alias_regularity.rb#6 + def nonregular_type; end + + # Returns the value of attribute type_name. + # + # source://rbs/lib/rbs/type_alias_regularity.rb#6 + def type_name; end +end + +# source://rbs/lib/rbs/type_name.rb#4 +class RBS::TypeName + # @return [TypeName] a new instance of TypeName + # + # source://rbs/lib/rbs/type_name.rb#9 + def initialize(namespace:, name:); end + + # source://rbs/lib/rbs/type_name.rb#79 + def +(other); end + + # source://rbs/lib/rbs/type_name.rb#25 + def ==(other); end + + # source://rbs/lib/rbs/type_name.rb#55 + def absolute!; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/type_name.rb#59 + def absolute?; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/type_name.rb#51 + def alias?; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/type_name.rb#47 + def class?; end + + # source://rbs/lib/rbs/type_name.rb#25 + def eql?(other); end + + # source://rbs/lib/rbs/type_name.rb#31 + def hash; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/type_name.rb#67 + def interface?; end + + # Returns the value of attribute kind. + # + # source://rbs/lib/rbs/type_name.rb#7 + def kind; end + + # Returns the value of attribute name. + # + # source://rbs/lib/rbs/type_name.rb#6 + def name; end + + # Returns the value of attribute namespace. + # + # source://rbs/lib/rbs/type_name.rb#5 + def namespace; end + + # source://rbs/lib/rbs/type_name.rb#63 + def relative!; end + + # source://rbs/lib/rbs/type_name.rb#75 + def split; end + + # source://rbs/lib/rbs/type_name.rb#39 + def to_json(state = T.unsafe(nil)); end + + # source://rbs/lib/rbs/type_name.rb#43 + def to_namespace; end + + # source://rbs/lib/rbs/type_name.rb#35 + def to_s; end + + # source://rbs/lib/rbs/type_name.rb#71 + def with_prefix(namespace); end +end + +# source://rbs/lib/rbs/errors.rb#580 +class RBS::TypeParamDefaultReferenceError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [TypeParamDefaultReferenceError] a new instance of TypeParamDefaultReferenceError + # + # source://rbs/lib/rbs/errors.rb#586 + def initialize(type_param, location:); end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/errors.rb#584 + def location; end + + # Returns the value of attribute type_param. + # + # source://rbs/lib/rbs/errors.rb#583 + def type_param; end + + class << self + # source://rbs/lib/rbs/errors.rb#592 + def check!(type_params); end + end +end + +# source://rbs/lib/rbs/types.rb#4 +module RBS::Types; end + +# source://rbs/lib/rbs/types.rb#394 +class RBS::Types::Alias + include ::RBS::Types::Application + + # @return [Alias] a new instance of Alias + # + # source://rbs/lib/rbs/types.rb#399 + def initialize(name:, args:, location:); end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/types.rb#395 + def location; end + + # source://rbs/lib/rbs/types.rb#421 + def map_type(&block); end + + # source://rbs/lib/rbs/types.rb#413 + def map_type_name(&block); end + + # source://rbs/lib/rbs/types.rb#409 + def sub(s); end + + # source://rbs/lib/rbs/types.rb#405 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs/lib/rbs/types.rb#252 +module RBS::Types::Application + # source://rbs/lib/rbs/types.rb#256 + def ==(other); end + + # Returns the value of attribute args. + # + # source://rbs/lib/rbs/types.rb#254 + def args; end + + # source://rbs/lib/rbs/types.rb#282 + def each_type(&block); end + + # source://rbs/lib/rbs/types.rb#256 + def eql?(other); end + + # source://rbs/lib/rbs/types.rb#266 + def free_variables(set = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#294 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#290 + def has_self_type?; end + + # source://rbs/lib/rbs/types.rb#262 + def hash; end + + # Returns the value of attribute name. + # + # source://rbs/lib/rbs/types.rb#253 + def name; end + + # source://rbs/lib/rbs/types.rb#274 + def to_s(level = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#298 + def with_nonreturn_void?; end +end + +# source://rbs/lib/rbs/types.rb#41 +module RBS::Types::Bases; end + +# source://rbs/lib/rbs/types.rb#109 +class RBS::Types::Bases::Any < ::RBS::Types::Bases::Base + # source://rbs/lib/rbs/types.rb#110 + def to_s(level = T.unsafe(nil)); end + + # source://rbs/lib/rbs/types.rb#114 + def todo!; end +end + +# source://rbs/lib/rbs/types.rb#42 +class RBS::Types::Bases::Base + include ::RBS::Types::NoFreeVariables + include ::RBS::Types::NoSubst + include ::RBS::Types::EmptyEachType + include ::RBS::Types::NoTypeName + + # @return [Base] a new instance of Base + # + # source://rbs/lib/rbs/types.rb#45 + def initialize(location:); end + + # source://rbs/lib/rbs/types.rb#49 + def ==(other); end + + # source://rbs/lib/rbs/types.rb#49 + def eql?(other); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#98 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#94 + def has_self_type?; end + + # source://rbs/lib/rbs/types.rb#53 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/types.rb#43 + def location; end + + # source://rbs/lib/rbs/types.rb#64 + def to_json(state = T.unsafe(nil)); end + + # source://rbs/lib/rbs/types.rb#69 + def to_s(level = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#102 + def with_nonreturn_void?; end +end + +# source://rbs/lib/rbs/types.rb#107 +class RBS::Types::Bases::Bool < ::RBS::Types::Bases::Base; end + +# source://rbs/lib/rbs/types.rb#121 +class RBS::Types::Bases::Bottom < ::RBS::Types::Bases::Base; end + +# source://rbs/lib/rbs/types.rb#128 +class RBS::Types::Bases::Class < ::RBS::Types::Bases::Base; end + +# source://rbs/lib/rbs/types.rb#123 +class RBS::Types::Bases::Instance < ::RBS::Types::Bases::Base + # source://rbs/lib/rbs/types.rb#124 + def sub(s); end +end + +# source://rbs/lib/rbs/types.rb#119 +class RBS::Types::Bases::Nil < ::RBS::Types::Bases::Base; end + +# source://rbs/lib/rbs/types.rb#122 +class RBS::Types::Bases::Self < ::RBS::Types::Bases::Base; end + +# source://rbs/lib/rbs/types.rb#120 +class RBS::Types::Bases::Top < ::RBS::Types::Bases::Base; end + +# source://rbs/lib/rbs/types.rb#108 +class RBS::Types::Bases::Void < ::RBS::Types::Bases::Base; end + +# source://rbs/lib/rbs/types.rb#1294 +class RBS::Types::Block + # @return [Block] a new instance of Block + # + # source://rbs/lib/rbs/types.rb#1299 + def initialize(type:, required:, self_type: T.unsafe(nil)); end + + # source://rbs/lib/rbs/types.rb#1305 + def ==(other); end + + # source://rbs/lib/rbs/types.rb#1328 + def map_type(&block); end + + # Returns the value of attribute required. + # + # source://rbs/lib/rbs/types.rb#1296 + def required; end + + # Returns the value of attribute self_type. + # + # source://rbs/lib/rbs/types.rb#1297 + def self_type; end + + # source://rbs/lib/rbs/types.rb#1320 + def sub(s); end + + # source://rbs/lib/rbs/types.rb#1312 + def to_json(state = T.unsafe(nil)); end + + # Returns the value of attribute type. + # + # source://rbs/lib/rbs/types.rb#1295 + def type; end +end + +# source://rbs/lib/rbs/types.rb#352 +class RBS::Types::ClassInstance + include ::RBS::Types::Application + + # @return [ClassInstance] a new instance of ClassInstance + # + # source://rbs/lib/rbs/types.rb#357 + def initialize(name:, args:, location:); end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/types.rb#353 + def location; end + + # source://rbs/lib/rbs/types.rb#381 + def map_type(&block); end + + # source://rbs/lib/rbs/types.rb#373 + def map_type_name(&block); end + + # source://rbs/lib/rbs/types.rb#367 + def sub(s); end + + # source://rbs/lib/rbs/types.rb#363 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs/lib/rbs/types.rb#200 +class RBS::Types::ClassSingleton + include ::RBS::Types::NoFreeVariables + include ::RBS::Types::NoSubst + include ::RBS::Types::EmptyEachType + + # @return [ClassSingleton] a new instance of ClassSingleton + # + # source://rbs/lib/rbs/types.rb#204 + def initialize(name:, location:); end + + # source://rbs/lib/rbs/types.rb#209 + def ==(other); end + + # source://rbs/lib/rbs/types.rb#209 + def eql?(other); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#243 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#239 + def has_self_type?; end + + # source://rbs/lib/rbs/types.rb#215 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/types.rb#202 + def location; end + + # source://rbs/lib/rbs/types.rb#232 + def map_type_name; end + + # Returns the value of attribute name. + # + # source://rbs/lib/rbs/types.rb#201 + def name; end + + # source://rbs/lib/rbs/types.rb#222 + def to_json(state = T.unsafe(nil)); end + + # source://rbs/lib/rbs/types.rb#226 + def to_s(level = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#247 + def with_nonreturn_void?; end +end + +# source://rbs/lib/rbs/types.rb#23 +module RBS::Types::EmptyEachType + # source://rbs/lib/rbs/types.rb#24 + def each_type; end + + # source://rbs/lib/rbs/types.rb#32 + def map_type(&block); end +end + +# source://rbs/lib/rbs/types.rb#871 +class RBS::Types::Function + # @return [Function] a new instance of Function + # + # source://rbs/lib/rbs/types.rb#927 + def initialize(required_positionals:, optional_positionals:, rest_positionals:, trailing_positionals:, required_keywords:, optional_keywords:, rest_keywords:, return_type:); end + + # source://rbs/lib/rbs/types.rb#938 + def ==(other); end + + # source://rbs/lib/rbs/types.rb#1009 + def amap(array, &block); end + + # source://rbs/lib/rbs/types.rb#1146 + def drop_head; end + + # source://rbs/lib/rbs/types.rb#1163 + def drop_tail; end + + # source://rbs/lib/rbs/types.rb#1046 + def each_param(&block); end + + # source://rbs/lib/rbs/types.rb#1031 + def each_type; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#1117 + def empty?; end + + # source://rbs/lib/rbs/types.rb#938 + def eql?(other); end + + # source://rbs/lib/rbs/types.rb#964 + def free_variables(set = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#1188 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#1176 + def has_keyword?; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#1184 + def has_self_type?; end + + # source://rbs/lib/rbs/types.rb#952 + def hash; end + + # source://rbs/lib/rbs/types.rb#1017 + def hmapv(hash, &block); end + + # source://rbs/lib/rbs/types.rb#992 + def map_type(&block); end + + # source://rbs/lib/rbs/types.rb#1025 + def map_type_name(&block); end + + # Returns the value of attribute optional_keywords. + # + # source://rbs/lib/rbs/types.rb#923 + def optional_keywords; end + + # Returns the value of attribute optional_positionals. + # + # source://rbs/lib/rbs/types.rb#919 + def optional_positionals; end + + # source://rbs/lib/rbs/types.rb#1127 + def param_to_s; end + + # Returns the value of attribute required_keywords. + # + # source://rbs/lib/rbs/types.rb#922 + def required_keywords; end + + # Returns the value of attribute required_positionals. + # + # source://rbs/lib/rbs/types.rb#918 + def required_positionals; end + + # Returns the value of attribute rest_keywords. + # + # source://rbs/lib/rbs/types.rb#924 + def rest_keywords; end + + # Returns the value of attribute rest_positionals. + # + # source://rbs/lib/rbs/types.rb#920 + def rest_positionals; end + + # source://rbs/lib/rbs/types.rb#1142 + def return_to_s; end + + # Returns the value of attribute return_type. + # + # source://rbs/lib/rbs/types.rb#925 + def return_type; end + + # source://rbs/lib/rbs/types.rb#1073 + def sub(s); end + + # source://rbs/lib/rbs/types.rb#1060 + def to_json(state = T.unsafe(nil)); end + + # Returns the value of attribute trailing_positionals. + # + # source://rbs/lib/rbs/types.rb#921 + def trailing_positionals; end + + # source://rbs/lib/rbs/types.rb#1103 + def update(required_positionals: T.unsafe(nil), optional_positionals: T.unsafe(nil), rest_positionals: T.unsafe(nil), trailing_positionals: T.unsafe(nil), required_keywords: T.unsafe(nil), optional_keywords: T.unsafe(nil), rest_keywords: T.unsafe(nil), return_type: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#1192 + def with_nonreturn_void?; end + + # source://rbs/lib/rbs/types.rb#1090 + def with_return_type(type); end + + class << self + # source://rbs/lib/rbs/types.rb#1077 + def empty(return_type); end + end +end + +# source://rbs/lib/rbs/types.rb#872 +class RBS::Types::Function::Param + # @return [Param] a new instance of Param + # + # source://rbs/lib/rbs/types.rb#877 + def initialize(type:, name:, location: T.unsafe(nil)); end + + # source://rbs/lib/rbs/types.rb#883 + def ==(other); end + + # source://rbs/lib/rbs/types.rb#883 + def eql?(other); end + + # source://rbs/lib/rbs/types.rb#889 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/types.rb#875 + def location; end + + # source://rbs/lib/rbs/types.rb#893 + def map_type(&block); end + + # Returns the value of attribute name. + # + # source://rbs/lib/rbs/types.rb#874 + def name; end + + # source://rbs/lib/rbs/types.rb#901 + def to_json(state = T.unsafe(nil)); end + + # source://rbs/lib/rbs/types.rb#905 + def to_s; end + + # Returns the value of attribute type. + # + # source://rbs/lib/rbs/types.rb#873 + def type; end +end + +# source://rbs/lib/rbs/types.rb#310 +class RBS::Types::Interface + include ::RBS::Types::Application + + # @return [Interface] a new instance of Interface + # + # source://rbs/lib/rbs/types.rb#315 + def initialize(name:, args:, location:); end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/types.rb#311 + def location; end + + # source://rbs/lib/rbs/types.rb#339 + def map_type(&block); end + + # source://rbs/lib/rbs/types.rb#331 + def map_type_name(&block); end + + # source://rbs/lib/rbs/types.rb#325 + def sub(s); end + + # source://rbs/lib/rbs/types.rb#321 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs/lib/rbs/types.rb#790 +class RBS::Types::Intersection + # @return [Intersection] a new instance of Intersection + # + # source://rbs/lib/rbs/types.rb#794 + def initialize(types:, location:); end + + # source://rbs/lib/rbs/types.rb#799 + def ==(other); end + + # source://rbs/lib/rbs/types.rb#835 + def each_type(&block); end + + # source://rbs/lib/rbs/types.rb#799 + def eql?(other); end + + # source://rbs/lib/rbs/types.rb#809 + def free_variables(set = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#862 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#858 + def has_self_type?; end + + # source://rbs/lib/rbs/types.rb#805 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/types.rb#792 + def location; end + + # source://rbs/lib/rbs/types.rb#843 + def map_type(&block); end + + # source://rbs/lib/rbs/types.rb#851 + def map_type_name(&block); end + + # source://rbs/lib/rbs/types.rb#821 + def sub(s); end + + # source://rbs/lib/rbs/types.rb#817 + def to_json(state = T.unsafe(nil)); end + + # source://rbs/lib/rbs/types.rb#826 + def to_s(level = T.unsafe(nil)); end + + # Returns the value of attribute types. + # + # source://rbs/lib/rbs/types.rb#791 + def types; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#866 + def with_nonreturn_void?; end +end + +# source://rbs/lib/rbs/types.rb#1469 +class RBS::Types::Literal + include ::RBS::Types::NoFreeVariables + include ::RBS::Types::NoSubst + include ::RBS::Types::EmptyEachType + include ::RBS::Types::NoTypeName + + # @return [Literal] a new instance of Literal + # + # source://rbs/lib/rbs/types.rb#1473 + def initialize(literal:, location:); end + + # source://rbs/lib/rbs/types.rb#1478 + def ==(other); end + + # source://rbs/lib/rbs/types.rb#1478 + def eql?(other); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#1505 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#1501 + def has_self_type?; end + + # source://rbs/lib/rbs/types.rb#1484 + def hash; end + + # Returns the value of attribute literal. + # + # source://rbs/lib/rbs/types.rb#1470 + def literal; end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/types.rb#1471 + def location; end + + # source://rbs/lib/rbs/types.rb#1493 + def to_json(state = T.unsafe(nil)); end + + # source://rbs/lib/rbs/types.rb#1497 + def to_s(level = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#1509 + def with_nonreturn_void?; end + + class << self + # source://rbs/lib/rbs/types.rb#1529 + def unescape_string(string, is_double_quote); end + end +end + +# source://rbs/lib/rbs/types.rb#1513 +RBS::Types::Literal::TABLE = T.let(T.unsafe(nil), Hash) + +# source://rbs/lib/rbs/types.rb#5 +module RBS::Types::NoFreeVariables + # source://rbs/lib/rbs/types.rb#6 + def free_variables(set = T.unsafe(nil)); end +end + +# source://rbs/lib/rbs/types.rb#11 +module RBS::Types::NoSubst + # source://rbs/lib/rbs/types.rb#12 + def sub(s); end +end + +# source://rbs/lib/rbs/types.rb#17 +module RBS::Types::NoTypeName + # source://rbs/lib/rbs/types.rb#18 + def map_type_name; end +end + +# source://rbs/lib/rbs/types.rb#626 +class RBS::Types::Optional + # @return [Optional] a new instance of Optional + # + # source://rbs/lib/rbs/types.rb#630 + def initialize(type:, location:); end + + # source://rbs/lib/rbs/types.rb#635 + def ==(other); end + + # source://rbs/lib/rbs/types.rb#671 + def each_type; end + + # source://rbs/lib/rbs/types.rb#635 + def eql?(other); end + + # source://rbs/lib/rbs/types.rb#645 + def free_variables(set = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#701 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#697 + def has_self_type?; end + + # source://rbs/lib/rbs/types.rb#641 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/types.rb#628 + def location; end + + # source://rbs/lib/rbs/types.rb#686 + def map_type(&block); end + + # source://rbs/lib/rbs/types.rb#679 + def map_type_name(&block); end + + # source://rbs/lib/rbs/types.rb#653 + def sub(s); end + + # source://rbs/lib/rbs/types.rb#649 + def to_json(state = T.unsafe(nil)); end + + # source://rbs/lib/rbs/types.rb#657 + def to_s(level = T.unsafe(nil)); end + + # Returns the value of attribute type. + # + # source://rbs/lib/rbs/types.rb#627 + def type; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#705 + def with_nonreturn_void?; end +end + +# source://rbs/lib/rbs/types.rb#1349 +class RBS::Types::Proc + # @return [Proc] a new instance of Proc + # + # source://rbs/lib/rbs/types.rb#1355 + def initialize(location:, type:, block:, self_type: T.unsafe(nil)); end + + # source://rbs/lib/rbs/types.rb#1362 + def ==(other); end + + # Returns the value of attribute block. + # + # source://rbs/lib/rbs/types.rb#1351 + def block; end + + # source://rbs/lib/rbs/types.rb#1414 + def each_type(&block); end + + # source://rbs/lib/rbs/types.rb#1362 + def eql?(other); end + + # source://rbs/lib/rbs/types.rb#1372 + def free_variables(set = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#1452 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#1448 + def has_self_type?; end + + # source://rbs/lib/rbs/types.rb#1368 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/types.rb#1353 + def location; end + + # source://rbs/lib/rbs/types.rb#1435 + def map_type(&block); end + + # source://rbs/lib/rbs/types.rb#1426 + def map_type_name(&block); end + + # Returns the value of attribute self_type. + # + # source://rbs/lib/rbs/types.rb#1352 + def self_type; end + + # source://rbs/lib/rbs/types.rb#1389 + def sub(s); end + + # source://rbs/lib/rbs/types.rb#1379 + def to_json(state = T.unsafe(nil)); end + + # source://rbs/lib/rbs/types.rb#1398 + def to_s(level = T.unsafe(nil)); end + + # Returns the value of attribute type. + # + # source://rbs/lib/rbs/types.rb#1350 + def type; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#1456 + def with_nonreturn_void?; end +end + +# source://rbs/lib/rbs/types.rb#517 +class RBS::Types::Record + # @return [Record] a new instance of Record + # + # source://rbs/lib/rbs/types.rb#521 + def initialize(location:, all_fields: T.unsafe(nil), fields: T.unsafe(nil)); end + + # source://rbs/lib/rbs/types.rb#538 + def ==(other); end + + # Returns the value of attribute all_fields. + # + # source://rbs/lib/rbs/types.rb#518 + def all_fields; end + + # source://rbs/lib/rbs/types.rb#586 + def each_type(&block); end + + # source://rbs/lib/rbs/types.rb#538 + def eql?(other); end + + # Returns the value of attribute fields. + # + # source://rbs/lib/rbs/types.rb#518 + def fields; end + + # source://rbs/lib/rbs/types.rb#548 + def free_variables(set = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#617 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#613 + def has_self_type?; end + + # source://rbs/lib/rbs/types.rb#544 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/types.rb#519 + def location; end + + # source://rbs/lib/rbs/types.rb#602 + def map_type(&block); end + + # source://rbs/lib/rbs/types.rb#595 + def map_type_name(&block); end + + # Returns the value of attribute optional_fields. + # + # source://rbs/lib/rbs/types.rb#518 + def optional_fields; end + + # source://rbs/lib/rbs/types.rb#563 + def sub(s); end + + # source://rbs/lib/rbs/types.rb#559 + def to_json(state = T.unsafe(nil)); end + + # source://rbs/lib/rbs/types.rb#570 + def to_s(level = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#621 + def with_nonreturn_void?; end +end + +# source://rbs/lib/rbs/types.rb#1337 +module RBS::Types::SelfTypeBindingHelper + private + + # source://rbs/lib/rbs/types.rb#1340 + def self_type_binding_to_s(t); end + + class << self + # source://rbs/lib/rbs/types.rb#1340 + def self_type_binding_to_s(t); end + end +end + +# source://rbs/lib/rbs/types.rb#434 +class RBS::Types::Tuple + # @return [Tuple] a new instance of Tuple + # + # source://rbs/lib/rbs/types.rb#438 + def initialize(types:, location:); end + + # source://rbs/lib/rbs/types.rb#443 + def ==(other); end + + # source://rbs/lib/rbs/types.rb#478 + def each_type(&block); end + + # source://rbs/lib/rbs/types.rb#443 + def eql?(other); end + + # source://rbs/lib/rbs/types.rb#453 + def free_variables(set = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#508 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#504 + def has_self_type?; end + + # source://rbs/lib/rbs/types.rb#449 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/types.rb#436 + def location; end + + # source://rbs/lib/rbs/types.rb#493 + def map_type(&block); end + + # source://rbs/lib/rbs/types.rb#486 + def map_type_name(&block); end + + # source://rbs/lib/rbs/types.rb#465 + def sub(s); end + + # source://rbs/lib/rbs/types.rb#461 + def to_json(state = T.unsafe(nil)); end + + # source://rbs/lib/rbs/types.rb#470 + def to_s(level = T.unsafe(nil)); end + + # Returns the value of attribute types. + # + # source://rbs/lib/rbs/types.rb#435 + def types; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#512 + def with_nonreturn_void?; end +end + +# source://rbs/lib/rbs/types.rb#710 +class RBS::Types::Union + # @return [Union] a new instance of Union + # + # source://rbs/lib/rbs/types.rb#714 + def initialize(types:, location:); end + + # source://rbs/lib/rbs/types.rb#719 + def ==(other); end + + # source://rbs/lib/rbs/types.rb#754 + def each_type(&block); end + + # source://rbs/lib/rbs/types.rb#719 + def eql?(other); end + + # source://rbs/lib/rbs/types.rb#729 + def free_variables(set = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#781 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#777 + def has_self_type?; end + + # source://rbs/lib/rbs/types.rb#725 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/types.rb#712 + def location; end + + # source://rbs/lib/rbs/types.rb#762 + def map_type(&block); end + + # source://rbs/lib/rbs/types.rb#770 + def map_type_name(&block); end + + # source://rbs/lib/rbs/types.rb#741 + def sub(s); end + + # source://rbs/lib/rbs/types.rb#737 + def to_json(state = T.unsafe(nil)); end + + # source://rbs/lib/rbs/types.rb#746 + def to_s(level = T.unsafe(nil)); end + + # Returns the value of attribute types. + # + # source://rbs/lib/rbs/types.rb#711 + def types; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#785 + def with_nonreturn_void?; end +end + +# source://rbs/lib/rbs/types.rb#1205 +class RBS::Types::UntypedFunction + # @return [UntypedFunction] a new instance of UntypedFunction + # + # source://rbs/lib/rbs/types.rb#1208 + def initialize(return_type:); end + + # source://rbs/lib/rbs/types.rb#1282 + def ==(other); end + + # source://rbs/lib/rbs/types.rb#1232 + def each_param(&block); end + + # source://rbs/lib/rbs/types.rb#1224 + def each_type(&block); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#1258 + def empty?; end + + # source://rbs/lib/rbs/types.rb#1282 + def eql?(other); end + + # source://rbs/lib/rbs/types.rb#1212 + def free_variables(acc = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#1266 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#1262 + def has_self_type?; end + + # source://rbs/lib/rbs/types.rb#1288 + def hash; end + + # source://rbs/lib/rbs/types.rb#1216 + def map_type(&block); end + + # source://rbs/lib/rbs/types.rb#1274 + def param_to_s; end + + # source://rbs/lib/rbs/types.rb#1278 + def return_to_s; end + + # Returns the value of attribute return_type. + # + # source://rbs/lib/rbs/types.rb#1206 + def return_type; end + + # source://rbs/lib/rbs/types.rb#1246 + def sub(subst); end + + # source://rbs/lib/rbs/types.rb#1240 + def to_json(state = T.unsafe(nil)); end + + # source://rbs/lib/rbs/types.rb#1254 + def update(return_type: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#1270 + def with_nonreturn_void?; end + + # source://rbs/lib/rbs/types.rb#1250 + def with_return_type(ty); end +end + +# source://rbs/lib/rbs/types.rb#131 +class RBS::Types::Variable + include ::RBS::Types::NoTypeName + include ::RBS::Types::EmptyEachType + + # @return [Variable] a new instance of Variable + # + # source://rbs/lib/rbs/types.rb#137 + def initialize(name:, location:); end + + # source://rbs/lib/rbs/types.rb#142 + def ==(other); end + + # source://rbs/lib/rbs/types.rb#142 + def eql?(other); end + + # source://rbs/lib/rbs/types.rb#152 + def free_variables(set = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#191 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#187 + def has_self_type?; end + + # source://rbs/lib/rbs/types.rb#148 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/types.rb#133 + def location; end + + # Returns the value of attribute name. + # + # source://rbs/lib/rbs/types.rb#132 + def name; end + + # source://rbs/lib/rbs/types.rb#162 + def sub(s); end + + # source://rbs/lib/rbs/types.rb#158 + def to_json(state = T.unsafe(nil)); end + + # source://rbs/lib/rbs/types.rb#181 + def to_s(level = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/types.rb#195 + def with_nonreturn_void?; end + + class << self + # source://rbs/lib/rbs/types.rb#166 + def build(v); end + + # source://rbs/lib/rbs/types.rb#176 + def fresh(v = T.unsafe(nil)); end + end +end + +# source://rbs/lib/rbs/errors.rb#325 +class RBS::UnknownMethodAliasError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [UnknownMethodAliasError] a new instance of UnknownMethodAliasError + # + # source://rbs/lib/rbs/errors.rb#333 + def initialize(type_name:, original_name:, aliased_name:, location:); end + + # Returns the value of attribute aliased_name. + # + # source://rbs/lib/rbs/errors.rb#330 + def aliased_name; end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/errors.rb#331 + def location; end + + # Returns the value of attribute original_name. + # + # source://rbs/lib/rbs/errors.rb#329 + def original_name; end + + # Returns the value of attribute type_name. + # + # source://rbs/lib/rbs/errors.rb#328 + def type_name; end +end + +# source://rbs/lib/rbs/version.rb#4 +RBS::VERSION = T.let(T.unsafe(nil), String) + +# source://rbs/lib/rbs/validator.rb#4 +class RBS::Validator + # @return [Validator] a new instance of Validator + # + # source://rbs/lib/rbs/validator.rb#9 + def initialize(env:, resolver:); end + + # source://rbs/lib/rbs/validator.rb#15 + def absolute_type(type, context:, &block); end + + # Returns the value of attribute definition_builder. + # + # source://rbs/lib/rbs/validator.rb#7 + def definition_builder; end + + # Returns the value of attribute env. + # + # source://rbs/lib/rbs/validator.rb#5 + def env; end + + # Returns the value of attribute resolver. + # + # source://rbs/lib/rbs/validator.rb#6 + def resolver; end + + # source://rbs/lib/rbs/validator.rb#172 + def type_alias_dependency; end + + # source://rbs/lib/rbs/validator.rb#176 + def type_alias_regularity; end + + # source://rbs/lib/rbs/validator.rb#152 + def validate_class_alias(entry:); end + + # source://rbs/lib/rbs/validator.rb#102 + def validate_method_definition(method_def, type_name:); end + + # Validates presence of the relative type, and application arity match. + # + # source://rbs/lib/rbs/validator.rb#22 + def validate_type(type, context:); end + + # source://rbs/lib/rbs/validator.rb#61 + def validate_type_alias(entry:); end + + # source://rbs/lib/rbs/validator.rb#118 + def validate_type_params(params, type_name:, location:, method_name: T.unsafe(nil)); end +end + +# source://rbs/lib/rbs/variance_calculator.rb#4 +class RBS::VarianceCalculator + # @return [VarianceCalculator] a new instance of VarianceCalculator + # + # source://rbs/lib/rbs/variance_calculator.rb#78 + def initialize(builder:); end + + # Returns the value of attribute builder. + # + # source://rbs/lib/rbs/variance_calculator.rb#76 + def builder; end + + # source://rbs/lib/rbs/variance_calculator.rb#82 + def env; end + + # source://rbs/lib/rbs/variance_calculator.rb#169 + def function(type, result:, context:); end + + # source://rbs/lib/rbs/variance_calculator.rb#98 + def in_inherit(name:, args:, variables:); end + + # source://rbs/lib/rbs/variance_calculator.rb#86 + def in_method_type(method_type:, variables:); end + + # source://rbs/lib/rbs/variance_calculator.rb#110 + def in_type_alias(name:); end + + # source://rbs/lib/rbs/variance_calculator.rb#176 + def negate(variance); end + + # source://rbs/lib/rbs/variance_calculator.rb#121 + def type(type, result:, context:); end +end + +# source://rbs/lib/rbs/variance_calculator.rb#5 +class RBS::VarianceCalculator::Result + # @return [Result] a new instance of Result + # + # source://rbs/lib/rbs/variance_calculator.rb#8 + def initialize(variables:); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/variance_calculator.rb#45 + def compatible?(var, with_annotation:); end + + # source://rbs/lib/rbs/variance_calculator.rb#24 + def contravariant(x); end + + # source://rbs/lib/rbs/variance_calculator.rb#15 + def covariant(x); end + + # source://rbs/lib/rbs/variance_calculator.rb#37 + def each(&block); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/variance_calculator.rb#41 + def include?(name); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/variance_calculator.rb#60 + def incompatible?(params); end + + # source://rbs/lib/rbs/variance_calculator.rb#33 + def invariant(x); end + + # Returns the value of attribute result. + # + # source://rbs/lib/rbs/variance_calculator.rb#6 + def result; end +end + +# source://rbs/lib/rbs/vendorer.rb#4 +class RBS::Vendorer + # @return [Vendorer] a new instance of Vendorer + # + # source://rbs/lib/rbs/vendorer.rb#8 + def initialize(vendor_dir:, loader:); end + + # source://rbs/lib/rbs/vendorer.rb#21 + def clean!; end + + # source://rbs/lib/rbs/vendorer.rb#28 + def copy!; end + + # source://rbs/lib/rbs/vendorer.rb#13 + def ensure_dir; end + + # Returns the value of attribute loader. + # + # source://rbs/lib/rbs/vendorer.rb#6 + def loader; end + + # Returns the value of attribute vendor_dir. + # + # source://rbs/lib/rbs/vendorer.rb#5 + def vendor_dir; end +end + +# source://rbs/lib/rbs/errors.rb#569 +class RBS::WillSyntaxError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [WillSyntaxError] a new instance of WillSyntaxError + # + # source://rbs/lib/rbs/errors.rb#574 + def initialize(message, location:); end + + # Returns the value of attribute location. + # + # source://rbs/lib/rbs/errors.rb#572 + def location; end +end + +# source://rbs/lib/rbs/writer.rb#4 +class RBS::Writer + # @return [Writer] a new instance of Writer + # + # source://rbs/lib/rbs/writer.rb#8 + def initialize(out:); end + + # source://rbs/lib/rbs/writer.rb#361 + def attribute(kind, attr); end + + # source://rbs/lib/rbs/writer.rb#42 + def format_annotation(annotation); end + + # source://rbs/lib/rbs/writer.rb#23 + def indent(size = T.unsafe(nil)); end + + # Returns the value of attribute indentation. + # + # source://rbs/lib/rbs/writer.rb#6 + def indentation; end + + # source://rbs/lib/rbs/writer.rb#288 + def method_name(name); end + + # source://rbs/lib/rbs/writer.rb#214 + def name_and_args(name, args); end + + # source://rbs/lib/rbs/writer.rb#202 + def name_and_params(name, params); end + + # Returns the value of attribute out. + # + # source://rbs/lib/rbs/writer.rb#5 + def out; end + + # source://rbs/lib/rbs/writer.rb#30 + def prefix; end + + # source://rbs/lib/rbs/writer.rb#18 + def preserve!(preserve: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs/lib/rbs/writer.rb#14 + def preserve?; end + + # source://rbs/lib/rbs/writer.rb#391 + def preserve_empty_line(prev, decl); end + + # source://rbs/lib/rbs/writer.rb#224 + def put_lines(lines, leading_spaces:); end + + # source://rbs/lib/rbs/writer.rb#34 + def puts(string = T.unsafe(nil)); end + + # source://rbs/lib/rbs/writer.rb#79 + def write(contents); end + + # source://rbs/lib/rbs/writer.rb#60 + def write_annotation(annotations); end + + # source://rbs/lib/rbs/writer.rb#66 + def write_comment(comment); end + + # source://rbs/lib/rbs/writer.rb#114 + def write_decl(decl); end + + # source://rbs/lib/rbs/writer.rb#309 + def write_def(member); end + + # source://rbs/lib/rbs/writer.rb#97 + def write_directive(dir); end + + # source://rbs/lib/rbs/writer.rb#301 + def write_loc_source(located); end + + # source://rbs/lib/rbs/writer.rb#234 + def write_member(member); end +end + +# source://rbs/lib/rdoc/discover.rb#8 +class RDoc::Parser::RBS < ::RDoc::Parser + # source://rbs/lib/rdoc/discover.rb#10 + def scan; end +end diff --git a/sorbet/rbi/gems/ruby-lsp-rails@0.3.27.rbi b/sorbet/rbi/gems/ruby-lsp-rails@0.3.27.rbi new file mode 100644 index 000000000..680d69964 --- /dev/null +++ b/sorbet/rbi/gems/ruby-lsp-rails@0.3.27.rbi @@ -0,0 +1,684 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `ruby-lsp-rails` gem. +# Please instead update this file by running `bin/tapioca gem ruby-lsp-rails`. + + +# source://ruby-lsp-rails/lib/ruby_lsp_rails/version.rb#4 +module RubyLsp; end + +# # Supported features +# +# - [Hover](rdoc-ref:RubyLsp::Rails::Hover) +# - [CodeLens](rdoc-ref:RubyLsp::Rails::CodeLens) +# - [DocumentSymbol](rdoc-ref:RubyLsp::Rails::DocumentSymbol) +# - [Definition](rdoc-ref:RubyLsp::Rails::Definition) +# +# source://ruby-lsp-rails/lib/ruby_lsp_rails/version.rb#5 +module RubyLsp::Rails; end + +# source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/support/active_support_test_case_helper.rb#6 +module RubyLsp::Rails::ActiveSupportTestCaseHelper + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/support/active_support_test_case_helper.rb#10 + sig { params(node: ::Prism::CallNode).returns(T.nilable(::String)) } + def extract_test_case_name(node); end +end + +# source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#20 +class RubyLsp::Rails::Addon < ::RubyLsp::Addon + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#26 + sig { void } + def initialize; end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#53 + sig { override.params(global_state: ::RubyLsp::GlobalState, outgoing_queue: ::Thread::Queue).void } + def activate(global_state, outgoing_queue); end + + # Creates a new CodeLens listener. This method is invoked on every CodeLens request + # + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#82 + sig do + override + .params( + response_builder: RubyLsp::ResponseBuilders::CollectionResponseBuilder[::LanguageServer::Protocol::Interface::CodeLens], + uri: ::URI::Generic, + dispatcher: ::Prism::Dispatcher + ).void + end + def create_code_lens_listener(response_builder, uri, dispatcher); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#117 + sig do + override + .params( + response_builder: RubyLsp::ResponseBuilders::CollectionResponseBuilder[T.any(::LanguageServer::Protocol::Interface::Location, ::LanguageServer::Protocol::Interface::LocationLink)], + uri: ::URI::Generic, + node_context: ::RubyLsp::NodeContext, + dispatcher: ::Prism::Dispatcher + ).void + end + def create_definition_listener(response_builder, uri, node_context, dispatcher); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#103 + sig do + override + .params( + response_builder: RubyLsp::ResponseBuilders::DocumentSymbol, + dispatcher: ::Prism::Dispatcher + ).returns(::Object) + end + def create_document_symbol_listener(response_builder, dispatcher); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#93 + sig do + override + .params( + response_builder: RubyLsp::ResponseBuilders::Hover, + node_context: ::RubyLsp::NodeContext, + dispatcher: ::Prism::Dispatcher + ).void + end + def create_hover_listener(response_builder, node_context, dispatcher); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#65 + sig { override.void } + def deactivate; end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#142 + sig { override.params(title: ::String).void } + def handle_window_show_message_response(title); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#137 + sig { override.returns(::String) } + def name; end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#48 + sig { returns(::RubyLsp::Rails::RunnerClient) } + def rails_runner_client; end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#70 + sig { override.returns(::String) } + def version; end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#123 + sig { params(changes: T::Array[{uri: ::String, type: ::Integer}]).void } + def workspace_did_change_watched_files(changes); end + + private + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#169 + sig { params(id: ::String, title: ::String, percentage: T.nilable(::Integer), message: T.nilable(::String)).void } + def begin_progress(id, title, percentage: T.unsafe(nil), message: T.unsafe(nil)); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#194 + sig { params(id: ::String).void } + def end_progress(id); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#227 + sig { void } + def offer_to_run_pending_migrations; end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#201 + sig { params(global_state: ::RubyLsp::GlobalState, outgoing_queue: ::Thread::Queue).void } + def register_additional_file_watchers(global_state:, outgoing_queue:); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#187 + sig { params(id: ::String, percentage: T.nilable(::Integer), message: T.nilable(::String)).void } + def report_progress(id, percentage: T.unsafe(nil), message: T.unsafe(nil)); end +end + +# source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#23 +RubyLsp::Rails::Addon::RUN_MIGRATIONS_TITLE = T.let(T.unsafe(nil), String) + +# ![CodeLens demo](../../code_lens.gif) +# +# This feature adds Code Lens features for Rails applications. +# +# For Active Support test cases: +# +# - Run tests in the VS Terminal +# - Run tests in the VS Code Test Explorer +# - Debug tests +# - Run migrations in the VS Terminal +# +# For Rails controllers: +# +# - See the path corresponding to an action +# - Click on the action's Code Lens to jump to its declaration in the routes. +# +# Note: This depends on a support for the `rubyLsp.openFile` command. +# For the VS Code extension this is built-in, but for other editors this may require some custom configuration. +# +# The +# [code lens](https://microsoft.github.io/language-server-protocol/specification#textDocument_codeLens) +# request informs the editor of runnable commands such as tests. +# It's available for tests which inherit from `ActiveSupport::TestCase` or one of its descendants, such as +# `ActionDispatch::IntegrationTest`. +# +# # Example: +# +# For the following code, Code Lenses will be added above the class definition above each test method. +# +# ```ruby +# Run +# class HelloTest < ActiveSupport::TestCase # <- Will show code lenses above for running or debugging the whole test +# test "outputs hello" do # <- Will show code lenses above for running or debugging this test +# # ... +# end +# +# test "outputs goodbye" do # <- Will show code lenses above for running or debugging this test +# # ... +# end +# end +# ``` +# +# # Example: +# ```ruby +# Run +# class AddFirstNameToUsers < ActiveRecord::Migration[7.1] +# # ... +# end +# ``` +# +# The code lenses will be displayed above the class and above each test method. +# +# Note: When using the Test Explorer view, if your code contains a statement to pause execution (e.g. `debugger`) it +# will cause the test runner to hang. +# +# For the following code, assuming the routing contains `resources :users`, a Code Lens will be seen above each +# action. +# +# ```ruby +# class UsersController < ApplicationController +# GET /users(.:format) +# def index # <- Will show code lens above for the path +# end +# end +# ``` +# +# Note: Complex routing configurations may not be supported. +# +# source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/code_lens.rb#74 +class RubyLsp::Rails::CodeLens + include ::RubyLsp::Requests::Support::Common + include ::RubyLsp::Rails::ActiveSupportTestCaseHelper + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/code_lens.rb#88 + sig do + params( + client: ::RubyLsp::Rails::RunnerClient, + global_state: ::RubyLsp::GlobalState, + response_builder: RubyLsp::ResponseBuilders::CollectionResponseBuilder[::LanguageServer::Protocol::Interface::CodeLens], + uri: ::URI::Generic, + dispatcher: ::Prism::Dispatcher + ).void + end + def initialize(client, global_state, response_builder, uri, dispatcher); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/code_lens.rb#109 + sig { params(node: ::Prism::CallNode).void } + def on_call_node_enter(node); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/code_lens.rb#137 + sig { params(node: ::Prism::ClassNode).void } + def on_class_node_enter(node); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/code_lens.rb#161 + sig { params(node: ::Prism::ClassNode).void } + def on_class_node_leave(node); end + + # Although uncommon, Rails tests can be written with the classic "def test_name" syntax. + # + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/code_lens.rb#121 + sig { params(node: ::Prism::DefNode).void } + def on_def_node_enter(node); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/code_lens.rb#172 + sig { params(node: ::Prism::ModuleNode).void } + def on_module_node_enter(node); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/code_lens.rb#177 + sig { params(node: ::Prism::ModuleNode).void } + def on_module_node_leave(node); end + + private + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/code_lens.rb#192 + sig { params(node: ::Prism::DefNode).void } + def add_jump_to_view(node); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/code_lens.rb#252 + sig { params(node: ::Prism::Node, name: ::String, command: ::String).void } + def add_migrate_code_lens(node, name:, command:); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/code_lens.rb#220 + sig { params(node: ::Prism::DefNode).void } + def add_route_code_lens_to_action(node); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/code_lens.rb#265 + sig { params(node: ::Prism::Node, name: ::String, command: ::String, kind: ::Symbol).void } + def add_test_code_lens(node, name:, command:, kind:); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/code_lens.rb#184 + sig { returns(T.nilable(T::Boolean)) } + def controller?; end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/code_lens.rb#242 + sig { returns(::String) } + def migrate_command; end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/code_lens.rb#247 + sig { returns(T.nilable(::String)) } + def migration_version; end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/code_lens.rb#237 + sig { returns(::String) } + def test_command; end +end + +# ![Definition demo](../../definition.gif) +# +# The [definition +# request](https://microsoft.github.io/language-server-protocol/specification#textDocument_definition) jumps to the +# definition of the symbol under the cursor. +# +# Currently supported targets: +# +# - Callbacks +# - Named routes (e.g. `users_path`) +# +# # Example +# +# ```ruby +# before_action :foo # <- Go to definition on this symbol will jump to the method +# ``` +# +# Notes for named routes: +# +# - It is available only in Rails 7.1 or newer. +# - Route may be defined across multiple files, e.g. using `draw`, rather than in `routes.rb`. +# - Routes won't be found if not defined for the Rails development environment. +# - If using `constraints`, the route can only be found if the constraints are met. +# - Changes to routes won't be picked up until the server is restarted. +# +# source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/definition.rb#30 +class RubyLsp::Rails::Definition + include ::RubyLsp::Requests::Support::Common + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/definition.rb#45 + sig do + params( + client: ::RubyLsp::Rails::RunnerClient, + response_builder: RubyLsp::ResponseBuilders::CollectionResponseBuilder[T.any(::LanguageServer::Protocol::Interface::Location, ::LanguageServer::Protocol::Interface::LocationLink)], + node_context: ::RubyLsp::NodeContext, + index: ::RubyIndexer::Index, + dispatcher: ::Prism::Dispatcher + ).void + end + def initialize(client, response_builder, node_context, index, dispatcher); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/definition.rb#66 + sig { params(node: T.any(::Prism::StringNode, ::Prism::SymbolNode)).void } + def handle_possible_dsl(node); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/definition.rb#83 + sig { params(node: ::Prism::CallNode).void } + def on_call_node_enter(node); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/definition.rb#61 + sig { params(node: ::Prism::StringNode).void } + def on_string_node_enter(node); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/definition.rb#56 + sig { params(node: ::Prism::SymbolNode).void } + def on_symbol_node_enter(node); end + + private + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/definition.rb#142 + sig { params(name: ::String).void } + def collect_definitions(name); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/definition.rb#117 + sig { params(node: ::Prism::CallNode).void } + def handle_association(node); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/definition.rb#98 + sig { params(node: ::Prism::CallNode).void } + def handle_callback(node); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/definition.rb#134 + sig { params(node: ::Prism::CallNode).void } + def handle_route(node); end +end + +# ![Document Symbol demo](../../document_symbol.gif) +# +# The [document symbol](https://microsoft.github.io/language-server-protocol/specification#textDocument_documentSymbol) +# request allows users to navigate between associations, validations, callbacks and ActiveSupport test cases with +# VS Code's "Go to Symbol" feature. +# +# source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/document_symbol.rb#11 +class RubyLsp::Rails::DocumentSymbol + include ::RubyLsp::Requests::Support::Common + include ::RubyLsp::Rails::ActiveSupportTestCaseHelper + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/document_symbol.rb#22 + sig { params(response_builder: RubyLsp::ResponseBuilders::DocumentSymbol, dispatcher: ::Prism::Dispatcher).void } + def initialize(response_builder, dispatcher); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/document_symbol.rb#37 + sig { params(node: ::Prism::CallNode).void } + def on_call_node_enter(node); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/document_symbol.rb#66 + sig { params(node: ::Prism::ClassNode).void } + def on_class_node_enter(node); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/document_symbol.rb#71 + sig { params(node: ::Prism::ClassNode).void } + def on_class_node_leave(node); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/document_symbol.rb#76 + sig { params(node: ::Prism::ModuleNode).void } + def on_module_node_enter(node); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/document_symbol.rb#81 + sig { params(node: ::Prism::ModuleNode).void } + def on_module_node_leave(node); end + + private + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/document_symbol.rb#88 + sig { params(node: T.any(::Prism::ClassNode, ::Prism::ModuleNode)).void } + def add_to_namespace_stack(node); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/document_symbol.rb#223 + sig do + params( + name: ::String, + range: ::LanguageServer::Protocol::Interface::Range, + selection_range: ::LanguageServer::Protocol::Interface::Range + ).void + end + def append_document_symbol(name:, range:, selection_range:); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/document_symbol.rb#98 + sig { params(node: ::Prism::CallNode, message: ::String).void } + def handle_all_arg_types(node, message); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/document_symbol.rb#197 + sig { params(node: ::Prism::CallNode, message: ::String).void } + def handle_class_arg_types(node, message); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/document_symbol.rb#168 + sig { params(node: ::Prism::CallNode, message: ::String).void } + def handle_symbol_and_string_arg_types(node, message); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/document_symbol.rb#93 + sig { params(node: T.any(::Prism::ClassNode, ::Prism::ModuleNode)).void } + def remove_from_namespace_stack(node); end +end + +# ![Hover demo](../../hover.gif) +# +# Augment [hover](https://microsoft.github.io/language-server-protocol/specification#textDocument_hover) with +# information about a model. +# +# # Example +# +# ```ruby +# User.all +# # ^ hovering here will show information about the User model +# ``` +# +# source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/hover.rb#17 +class RubyLsp::Rails::Hover + include ::RubyLsp::Requests::Support::Common + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/hover.rb#30 + sig do + params( + client: ::RubyLsp::Rails::RunnerClient, + response_builder: RubyLsp::ResponseBuilders::Hover, + node_context: ::RubyLsp::NodeContext, + global_state: ::RubyLsp::GlobalState, + dispatcher: ::Prism::Dispatcher + ).void + end + def initialize(client, response_builder, node_context, global_state, dispatcher); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/hover.rb#39 + sig { params(node: ::Prism::ConstantPathNode).void } + def on_constant_path_node_enter(node); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/hover.rb#48 + sig { params(node: ::Prism::ConstantReadNode).void } + def on_constant_read_node_enter(node); end + + private + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/hover.rb#83 + sig { params(default_value: ::String, type: ::String).returns(::String) } + def format_default(default_value, type); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/hover.rb#58 + sig { params(name: ::String).void } + def generate_column_content(name); end +end + +# source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/indexing_enhancement.rb#6 +class RubyLsp::Rails::IndexingEnhancement < ::RubyIndexer::Enhancement + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/indexing_enhancement.rb#14 + sig { override.params(call_node: ::Prism::CallNode).void } + def on_call_node_enter(call_node); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/indexing_enhancement.rb#34 + sig { override.params(call_node: ::Prism::CallNode).void } + def on_call_node_leave(call_node); end + + private + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/indexing_enhancement.rb#48 + sig { params(owner: ::RubyIndexer::Entry::Namespace, call_node: ::Prism::CallNode).void } + def handle_association(owner, call_node); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/indexing_enhancement.rb#102 + sig { params(owner: ::RubyIndexer::Entry::Namespace, call_node: ::Prism::CallNode).void } + def handle_class_methods(owner, call_node); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/indexing_enhancement.rb#77 + sig { params(owner: ::RubyIndexer::Entry::Namespace, call_node: ::Prism::CallNode).void } + def handle_concern_extend(owner, call_node); end +end + +# source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#341 +class RubyLsp::Rails::NullClient < ::RubyLsp::Rails::RunnerClient + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#345 + sig { void } + def initialize; end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#359 + sig { override.returns(::String) } + def rails_root; end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#349 + sig { override.void } + def shutdown; end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#354 + sig { override.returns(T::Boolean) } + def stopped?; end + + private + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#366 + sig { params(message: ::String, type: ::Integer).void } + def log_message(message, type: T.unsafe(nil)); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#376 + sig { override.returns(T.nilable(T::Hash[::Symbol, T.untyped])) } + def read_response; end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#371 + sig { override.params(request: ::String, params: T.untyped).void } + def send_message(request, **params); end +end + +# source://ruby-lsp-rails/lib/ruby_lsp_rails/railtie.rb#8 +class RubyLsp::Rails::Railtie < ::Rails::Railtie; end + +# source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#9 +class RubyLsp::Rails::RunnerClient + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#55 + sig { params(outgoing_queue: ::Thread::Queue).void } + def initialize(outgoing_queue); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#143 + sig { params(model_name: ::String, association_name: ::String).returns(T.nilable(T::Hash[::Symbol, T.untyped])) } + def association_target_location(model_name:, association_name:); end + + # Delegates a notification to a server add-on + # + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#181 + sig { params(server_addon_name: ::String, request_name: ::String, params: T.untyped).void } + def delegate_notification(server_addon_name:, request_name:, **params); end + + # Delegates a request to a server add-on + # + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#221 + sig do + params( + server_addon_name: ::String, + request_name: ::String, + params: T.untyped + ).returns(T.nilable(T::Hash[::Symbol, T.untyped])) + end + def delegate_request(server_addon_name:, request_name:, **params); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#266 + sig { params(request: ::String, params: T.untyped).returns(T.nilable(T::Hash[::Symbol, T.untyped])) } + def make_request(request, **params); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#127 + sig { params(name: ::String).returns(T.nilable(T::Hash[::Symbol, T.untyped])) } + def model(name); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#191 + sig { returns(T.nilable(::String)) } + def pending_migrations_message; end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#52 + sig { returns(::String) } + def rails_root; end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#116 + sig { params(server_addon_path: ::String).void } + def register_server_addon(server_addon_path); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#169 + sig { params(controller: ::String, action: ::String).returns(T.nilable(T::Hash[::Symbol, T.untyped])) } + def route(controller:, action:); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#158 + sig { params(name: ::String).returns(T.nilable(T::Hash[::Symbol, T.untyped])) } + def route_location(name); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#203 + sig { returns(T.nilable(T::Hash[::Symbol, T.untyped])) } + def run_migrations; end + + # Notifications are like messages, but one-way, with no response sent back. + # + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#273 + sig { params(request: ::String, params: T.untyped).void } + def send_notification(request, **params); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#245 + sig { void } + def shutdown; end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#256 + sig { returns(T::Boolean) } + def stopped?; end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#233 + sig { void } + def trigger_reload; end + + private + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#317 + sig { void } + def force_kill; end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#323 + sig { params(message: ::String, type: ::Integer).void } + def log_message(message, type: T.unsafe(nil)); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#330 + sig { returns(T.nilable(::Integer)) } + def read_content_length; end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#291 + sig { overridable.returns(T.nilable(T::Hash[::Symbol, T.untyped])) } + def read_response; end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#278 + sig { overridable.params(request: ::String, params: T.untyped).void } + def send_message(request, **params); end + + class << self + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#14 + sig { params(outgoing_queue: ::Thread::Queue).returns(::RubyLsp::Rails::RunnerClient) } + def create_client(outgoing_queue); end + end +end + +# source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#47 +class RubyLsp::Rails::RunnerClient::EmptyMessageError < ::RubyLsp::Rails::RunnerClient::MessageError; end + +# source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#45 +class RubyLsp::Rails::RunnerClient::InitializationError < ::StandardError; end + +# source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#46 +class RubyLsp::Rails::RunnerClient::MessageError < ::StandardError; end + +# source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/support/associations.rb#6 +module RubyLsp::Rails::Support; end + +# source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/support/associations.rb#7 +module RubyLsp::Rails::Support::Associations; end + +# source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/support/associations.rb#8 +RubyLsp::Rails::Support::Associations::ALL = T.let(T.unsafe(nil), Array) + +# source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/support/callbacks.rb#7 +module RubyLsp::Rails::Support::Callbacks; end + +# source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/support/callbacks.rb#67 +RubyLsp::Rails::Support::Callbacks::ALL = T.let(T.unsafe(nil), Array) + +# source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/support/callbacks.rb#37 +RubyLsp::Rails::Support::Callbacks::CONTROLLERS = T.let(T.unsafe(nil), Array) + +# source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/support/callbacks.rb#55 +RubyLsp::Rails::Support::Callbacks::JOBS = T.let(T.unsafe(nil), Array) + +# source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/support/callbacks.rb#8 +RubyLsp::Rails::Support::Callbacks::MODELS = T.let(T.unsafe(nil), Array) + +# source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/support/location_builder.rb#7 +class RubyLsp::Rails::Support::LocationBuilder + class << self + # @raise [ArgumentError] + # + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/support/location_builder.rb#12 + sig { params(location_string: ::String).returns(::LanguageServer::Protocol::Interface::Location) } + def line_location_from_s(location_string); end + end +end + +# source://ruby-lsp-rails/lib/ruby_lsp_rails/version.rb#6 +RubyLsp::Rails::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/ruby-lsp@0.22.1.rbi b/sorbet/rbi/gems/ruby-lsp@0.22.1.rbi new file mode 100644 index 000000000..eeb48a3db --- /dev/null +++ b/sorbet/rbi/gems/ruby-lsp@0.22.1.rbi @@ -0,0 +1,6117 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `ruby-lsp` gem. +# Please instead update this file by running `bin/tapioca gem ruby-lsp`. + + +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/indexable_path.rb#4 +module RubyIndexer; end + +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/configuration.rb#5 +class RubyIndexer::Configuration + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/configuration.rb#26 + sig { void } + def initialize; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/configuration.rb#229 + sig { params(config: T::Hash[::String, T.untyped]).void } + def apply_config(config); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/configuration.rb#23 + sig { returns(::Encoding) } + def encoding; end + + # @return [Encoding] + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/configuration.rb#23 + def encoding=(_arg0); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/configuration.rb#85 + sig { returns(T::Array[::RubyIndexer::IndexablePath]) } + def indexables; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/configuration.rb#224 + sig { returns(::Regexp) } + def magic_comment_regex; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/configuration.rb#70 + sig { returns(::String) } + def merged_excluded_file_pattern; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/configuration.rb#20 + sig { params(workspace_path: ::String).void } + def workspace_path=(workspace_path); end + + private + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/configuration.rb#257 + sig { returns(T::Array[::String]) } + def initial_excluded_gems; end + + # @raise [ArgumentError] + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/configuration.rb#242 + sig { params(config: T::Hash[::String, T.untyped]).void } + def validate_config!(config); end +end + +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/configuration.rb#8 +RubyIndexer::Configuration::CONFIGURATION_SCHEMA = T.let(T.unsafe(nil), Hash) + +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#5 +class RubyIndexer::DeclarationListener + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#23 + sig do + params( + index: ::RubyIndexer::Index, + dispatcher: ::Prism::Dispatcher, + parse_result: ::Prism::ParseResult, + file_path: ::String, + collect_comments: T::Boolean + ).void + end + def initialize(index, dispatcher, parse_result, file_path, collect_comments: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#493 + sig do + params( + name_or_nesting: T.any(::String, T::Array[::String]), + full_location: ::Prism::Location, + name_location: ::Prism::Location, + parent_class_name: T.nilable(::String), + comments: T.nilable(::String) + ).void + end + def add_class(name_or_nesting, full_location, name_location, parent_class_name: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#446 + sig do + params( + name: ::String, + node_location: ::Prism::Location, + signatures: T::Array[::RubyIndexer::Entry::Signature], + visibility: ::RubyIndexer::Entry::Visibility, + comments: T.nilable(::String) + ).void + end + def add_method(name, node_location, signatures, visibility: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#469 + sig do + params( + name: ::String, + full_location: ::Prism::Location, + name_location: ::Prism::Location, + comments: T.nilable(::String) + ).void + end + def add_module(name, full_location, name_location, comments: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#525 + sig { returns(T.nilable(::RubyIndexer::Entry::Namespace)) } + def current_owner; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#12 + sig { returns(T::Array[::String]) } + def indexing_errors; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#422 + sig { params(node: ::Prism::AliasMethodNode).void } + def on_alias_method_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#261 + sig { params(node: ::Prism::CallNode).void } + def on_call_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#300 + sig { params(node: ::Prism::CallNode).void } + def on_call_node_leave(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#87 + sig { params(node: ::Prism::ClassNode).void } + def on_class_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#119 + sig { params(node: ::Prism::ClassNode).void } + def on_class_node_leave(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#249 + sig { params(node: ::Prism::ConstantAndWriteNode).void } + def on_constant_and_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#255 + sig { params(node: ::Prism::ConstantOperatorWriteNode).void } + def on_constant_operator_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#243 + sig { params(node: ::Prism::ConstantOrWriteNode).void } + def on_constant_or_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#227 + sig { params(node: ::Prism::ConstantPathAndWriteNode).void } + def on_constant_path_and_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#217 + sig { params(node: ::Prism::ConstantPathOperatorWriteNode).void } + def on_constant_path_operator_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#207 + sig { params(node: ::Prism::ConstantPathOrWriteNode).void } + def on_constant_path_or_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#197 + sig { params(node: ::Prism::ConstantPathWriteNode).void } + def on_constant_path_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#237 + sig { params(node: ::Prism::ConstantWriteNode).void } + def on_constant_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#321 + sig { params(node: ::Prism::DefNode).void } + def on_def_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#362 + sig { params(node: ::Prism::DefNode).void } + def on_def_node_leave(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#372 + sig { params(node: ::Prism::GlobalVariableAndWriteNode).void } + def on_global_variable_and_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#377 + sig { params(node: ::Prism::GlobalVariableOperatorWriteNode).void } + def on_global_variable_operator_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#382 + sig { params(node: ::Prism::GlobalVariableOrWriteNode).void } + def on_global_variable_or_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#387 + sig { params(node: ::Prism::GlobalVariableTargetNode).void } + def on_global_variable_target_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#392 + sig { params(node: ::Prism::GlobalVariableWriteNode).void } + def on_global_variable_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#402 + sig { params(node: ::Prism::InstanceVariableAndWriteNode).void } + def on_instance_variable_and_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#407 + sig { params(node: ::Prism::InstanceVariableOperatorWriteNode).void } + def on_instance_variable_operator_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#412 + sig { params(node: ::Prism::InstanceVariableOrWriteNode).void } + def on_instance_variable_or_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#417 + sig { params(node: ::Prism::InstanceVariableTargetNode).void } + def on_instance_variable_target_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#397 + sig { params(node: ::Prism::InstanceVariableWriteNode).void } + def on_instance_variable_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#124 + sig { params(node: ::Prism::ModuleNode).void } + def on_module_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#130 + sig { params(node: ::Prism::ModuleNode).void } + def on_module_node_leave(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#177 + sig { params(node: ::Prism::MultiWriteNode).void } + def on_multi_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#135 + sig { params(node: ::Prism::SingletonClassNode).void } + def on_singleton_class_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#172 + sig { params(node: ::Prism::SingletonClassNode).void } + def on_singleton_class_node_leave(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#518 + sig { void } + def pop_namespace_stack; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#508 + sig { params(block: T.proc.params(index: ::RubyIndexer::Index, base: ::RubyIndexer::Entry::Namespace).void).void } + def register_included_hook(&block); end + + private + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#1013 + sig { params(name: ::String).returns(T::Array[::String]) } + def actual_nesting(name); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#670 + sig do + params( + node: T.any(::Prism::ConstantAndWriteNode, ::Prism::ConstantOperatorWriteNode, ::Prism::ConstantOrWriteNode, ::Prism::ConstantPathAndWriteNode, ::Prism::ConstantPathOperatorWriteNode, ::Prism::ConstantPathOrWriteNode, ::Prism::ConstantPathTargetNode, ::Prism::ConstantPathWriteNode, ::Prism::ConstantTargetNode, ::Prism::ConstantWriteNode), + name: ::String, + value: T.nilable(::Prism::Node) + ).void + end + def add_constant(node, name, value = T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#1027 + sig { params(short_name: ::String, entry: ::RubyIndexer::Entry::Namespace).void } + def advance_namespace_stack(short_name, entry); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#721 + sig { params(node: ::Prism::Node).returns(T.nilable(::String)) } + def collect_comments(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#749 + sig { params(line: ::Integer).returns(T::Boolean) } + def comment_exists_at?(line); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#921 + sig { returns(::RubyIndexer::Entry::Visibility) } + def current_visibility; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#754 + sig { params(name: ::String).returns(::String) } + def fully_qualify_name(name); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#614 + sig { params(node: ::Prism::CallNode).void } + def handle_alias_method(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#763 + sig { params(node: ::Prism::CallNode, reader: T::Boolean, writer: T::Boolean).void } + def handle_attribute(node, reader:, writer:); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#543 + sig do + params( + node: T.any(::Prism::GlobalVariableAndWriteNode, ::Prism::GlobalVariableOperatorWriteNode, ::Prism::GlobalVariableOrWriteNode, ::Prism::GlobalVariableTargetNode, ::Prism::GlobalVariableWriteNode), + loc: ::Prism::Location + ).void + end + def handle_global_variable(node, loc); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#567 + sig do + params( + node: T.any(::Prism::InstanceVariableAndWriteNode, ::Prism::InstanceVariableOperatorWriteNode, ::Prism::InstanceVariableOrWriteNode, ::Prism::InstanceVariableTargetNode, ::Prism::InstanceVariableWriteNode), + loc: ::Prism::Location + ).void + end + def handle_instance_variable(node, loc); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#840 + sig { params(node: ::Prism::CallNode).void } + def handle_module_function(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#806 + sig { params(node: ::Prism::CallNode, operation: ::Symbol).void } + def handle_module_operation(node, operation); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#882 + sig { params(node: ::Prism::CallNode).void } + def handle_private_class_method(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#589 + sig { params(node: ::Prism::CallNode).void } + def handle_private_constant(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#926 + sig do + params( + parameters_node: T.nilable(::Prism::ParametersNode) + ).returns(T::Array[::RubyIndexer::Entry::Parameter]) + end + def list_params(parameters_node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#988 + sig { params(node: T.nilable(::Prism::Node)).returns(T.nilable(::Symbol)) } + def parameter_name(node); end +end + +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#9 +RubyIndexer::DeclarationListener::BASIC_OBJECT_NESTING = T.let(T.unsafe(nil), Array) + +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#8 +RubyIndexer::DeclarationListener::OBJECT_NESTING = T.let(T.unsafe(nil), Array) + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/enhancement.rb#5 +class RubyIndexer::Enhancement + abstract! + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/enhancement.rb#35 + sig { params(listener: ::RubyIndexer::DeclarationListener).void } + def initialize(listener); end + + # The `on_extend` indexing enhancement is invoked whenever an extend is encountered in the code. It can be used to + # register for an included callback, similar to what `ActiveSupport::Concern` does in order to auto-extend the + # `ClassMethods` modules + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/enhancement.rb#43 + sig { overridable.params(node: ::Prism::CallNode).void } + def on_call_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/enhancement.rb#46 + sig { overridable.params(node: ::Prism::CallNode).void } + def on_call_node_leave(node); end + + class << self + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/enhancement.rb#23 + sig { params(listener: ::RubyIndexer::DeclarationListener).returns(T::Array[::RubyIndexer::Enhancement]) } + def all(listener); end + + # Only available for testing purposes + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/enhancement.rb#29 + sig { void } + def clear; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/enhancement.rb#17 + sig { params(child: T::Class[::RubyIndexer::Enhancement]).void } + def inherited(child); end + end +end + +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#5 +class RubyIndexer::Entry + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#38 + sig do + params( + name: ::String, + file_path: ::String, + location: ::RubyIndexer::Location, + comments: T.nilable(::String) + ).void + end + def initialize(name, file_path, location, comments); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#67 + sig { returns(::String) } + def comments; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#62 + sig { returns(::String) } + def file_name; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#20 + sig { returns(::String) } + def file_path; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#23 + sig { returns(::RubyIndexer::Location) } + def location; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#17 + sig { returns(::String) } + def name; end + + # @return [RubyIndexer::Location] + # + # source://sorbet-runtime/0.5.11647lib/types/private/methods/_methods.rb#257 + def name_location(*args, **_arg1, &blk); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#57 + sig { returns(T::Boolean) } + def private?; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#52 + sig { returns(T::Boolean) } + def protected?; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#47 + sig { returns(T::Boolean) } + def public?; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#28 + sig { returns(::RubyIndexer::Entry::Visibility) } + def visibility; end + + # @return [Visibility] + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#28 + def visibility=(_arg0); end +end + +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#373 +class RubyIndexer::Entry::Accessor < ::RubyIndexer::Entry::Member + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#377 + sig { override.returns(T::Array[::RubyIndexer::Entry::Signature]) } + def signatures; end +end + +# A block method parameter, e.g. `def foo(&block)` +# +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#295 +class RubyIndexer::Entry::BlockParameter < ::RubyIndexer::Entry::Parameter + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#307 + sig { override.returns(::Symbol) } + def decorated_name; end + + class << self + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#301 + sig { returns(::RubyIndexer::Entry::BlockParameter) } + def anonymous; end + end +end + +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#296 +RubyIndexer::Entry::BlockParameter::DEFAULT_NAME = T.let(T.unsafe(nil), Symbol) + +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#178 +class RubyIndexer::Entry::Class < ::RubyIndexer::Entry::Namespace + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#196 + sig do + params( + nesting: T::Array[::String], + file_path: ::String, + location: ::RubyIndexer::Location, + name_location: ::RubyIndexer::Location, + comments: T.nilable(::String), + parent_class: T.nilable(::String) + ).void + end + def initialize(nesting, file_path, location, name_location, comments, parent_class); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#202 + sig { override.returns(::Integer) } + def ancestor_hash; end + + # The unresolved name of the parent class. This may return `nil`, which indicates the lack of an explicit parent + # and therefore ::Object is the correct parent class + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#184 + sig { returns(T.nilable(::String)) } + def parent_class; end +end + +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#224 +class RubyIndexer::Entry::Constant < ::RubyIndexer::Entry; end + +# Alias represents a resolved alias, which points to an existing constant target +# +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#456 +class RubyIndexer::Entry::ConstantAlias < ::RubyIndexer::Entry + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#463 + sig { params(target: ::String, unresolved_alias: ::RubyIndexer::Entry::UnresolvedConstantAlias).void } + def initialize(target, unresolved_alias); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#460 + sig { returns(::String) } + def target; end +end + +# A forwarding method parameter, e.g. `def foo(...)` +# +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#313 +class RubyIndexer::Entry::ForwardingParameter < ::RubyIndexer::Entry::Parameter + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#317 + sig { void } + def initialize; end +end + +# Represents a global variable e.g.: $DEBUG +# +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#477 +class RubyIndexer::Entry::GlobalVariable < ::RubyIndexer::Entry; end + +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#121 +class RubyIndexer::Entry::Include < ::RubyIndexer::Entry::ModuleOperation; end + +# Represents an instance variable e.g.: @a = 1 +# +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#480 +class RubyIndexer::Entry::InstanceVariable < ::RubyIndexer::Entry + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#493 + sig do + params( + name: ::String, + file_path: ::String, + location: ::RubyIndexer::Location, + comments: T.nilable(::String), + owner: T.nilable(::RubyIndexer::Entry::Namespace) + ).void + end + def initialize(name, file_path, location, comments, owner); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#482 + sig { returns(T.nilable(::RubyIndexer::Entry::Namespace)) } + def owner; end +end + +# An required keyword method parameter, e.g. `def foo(a:)` +# +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#259 +class RubyIndexer::Entry::KeywordParameter < ::RubyIndexer::Entry::Parameter + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#261 + sig { override.returns(::Symbol) } + def decorated_name; end +end + +# A keyword rest method parameter, e.g. `def foo(**a)` +# +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#285 +class RubyIndexer::Entry::KeywordRestParameter < ::RubyIndexer::Entry::Parameter + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#289 + sig { override.returns(::Symbol) } + def decorated_name; end +end + +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#286 +RubyIndexer::Entry::KeywordRestParameter::DEFAULT_NAME = T.let(T.unsafe(nil), Symbol) + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#323 +class RubyIndexer::Entry::Member < ::RubyIndexer::Entry + abstract! + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#342 + sig do + params( + name: ::String, + file_path: ::String, + location: ::RubyIndexer::Location, + comments: T.nilable(::String), + visibility: ::RubyIndexer::Entry::Visibility, + owner: T.nilable(::RubyIndexer::Entry::Namespace) + ).void + end + def initialize(name, file_path, location, comments, visibility, owner); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#352 + sig { returns(::String) } + def decorated_parameters; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#360 + sig { returns(::String) } + def formatted_signatures; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#330 + sig { returns(T.nilable(::RubyIndexer::Entry::Namespace)) } + def owner; end + + # @abstract + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#349 + sig { abstract.returns(T::Array[::RubyIndexer::Entry::Signature]) } + def signatures; end +end + +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#389 +class RubyIndexer::Entry::Method < ::RubyIndexer::Entry::Member + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#411 + sig do + params( + name: ::String, + file_path: ::String, + location: ::RubyIndexer::Location, + name_location: ::RubyIndexer::Location, + comments: T.nilable(::String), + signatures: T::Array[::RubyIndexer::Entry::Signature], + visibility: ::RubyIndexer::Entry::Visibility, + owner: T.nilable(::RubyIndexer::Entry::Namespace) + ).void + end + def initialize(name, file_path, location, name_location, comments, signatures, visibility, owner); end + + # Returns the location of the method name, excluding parameters or the body + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#397 + sig { returns(::RubyIndexer::Location) } + def name_location; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#393 + sig { override.returns(T::Array[::RubyIndexer::Entry::Signature]) } + def signatures; end +end + +# A method alias is a resolved alias entry that points to the exact method target it refers to +# +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#531 +class RubyIndexer::Entry::MethodAlias < ::RubyIndexer::Entry + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#543 + sig do + params( + target: T.any(::RubyIndexer::Entry::Member, ::RubyIndexer::Entry::MethodAlias), + unresolved_alias: ::RubyIndexer::Entry::UnresolvedMethodAlias + ).void + end + def initialize(target, unresolved_alias); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#560 + sig { returns(::String) } + def decorated_parameters; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#565 + sig { returns(::String) } + def formatted_signatures; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#538 + sig { returns(T.nilable(::RubyIndexer::Entry::Namespace)) } + def owner; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#570 + sig { returns(T::Array[::RubyIndexer::Entry::Signature]) } + def signatures; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#535 + sig { returns(T.any(::RubyIndexer::Entry::Member, ::RubyIndexer::Entry::MethodAlias)) } + def target; end +end + +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#175 +class RubyIndexer::Entry::Module < ::RubyIndexer::Entry::Namespace; end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#106 +class RubyIndexer::Entry::ModuleOperation + abstract! + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#116 + sig { params(module_name: ::String).void } + def initialize(module_name); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#113 + sig { returns(::String) } + def module_name; end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#124 +class RubyIndexer::Entry::Namespace < ::RubyIndexer::Entry + abstract! + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#146 + sig do + params( + nesting: T::Array[::String], + file_path: ::String, + location: ::RubyIndexer::Location, + name_location: ::RubyIndexer::Location, + comments: T.nilable(::String) + ).void + end + def initialize(nesting, file_path, location, name_location, comments); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#170 + sig { returns(::Integer) } + def ancestor_hash; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#157 + sig { returns(T::Array[::String]) } + def mixin_operation_module_names; end + + # Stores all explicit prepend, include and extend operations in the exact order they were discovered in the source + # code. Maintaining the order is essential to linearize ancestors the right way when a module is both included + # and prepended + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#165 + sig { returns(T::Array[::RubyIndexer::Entry::ModuleOperation]) } + def mixin_operations; end + + # Returns the location of the constant name, excluding the parent class or the body + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#135 + sig { returns(::RubyIndexer::Location) } + def name_location; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#131 + sig { returns(T::Array[::String]) } + def nesting; end +end + +# An optional keyword method parameter, e.g. `def foo(a: 123)` +# +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#267 +class RubyIndexer::Entry::OptionalKeywordParameter < ::RubyIndexer::Entry::Parameter + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#269 + sig { override.returns(::Symbol) } + def decorated_name; end +end + +# An optional method parameter, e.g. `def foo(a = 123)` +# +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#251 +class RubyIndexer::Entry::OptionalParameter < ::RubyIndexer::Entry::Parameter + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#253 + sig { override.returns(::Symbol) } + def decorated_name; end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#227 +class RubyIndexer::Entry::Parameter + abstract! + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#241 + sig { params(name: ::Symbol).void } + def initialize(name:); end + + # Name includes just the name of the parameter, excluding symbols like splats + # Decorated name is the parameter name including the splat or block prefix, e.g.: `*foo`, `**foo` or `&block` + # + # @return [Symbol] + # + # source://sorbet-runtime/0.5.11647lib/types/private/methods/_methods.rb#257 + def decorated_name(*args, **_arg1, &blk); end + + # Name includes just the name of the parameter, excluding symbols like splats + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#235 + sig { returns(::Symbol) } + def name; end +end + +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#122 +class RubyIndexer::Entry::Prepend < ::RubyIndexer::Entry::ModuleOperation; end + +# A required method parameter, e.g. `def foo(a)` +# +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#247 +class RubyIndexer::Entry::RequiredParameter < ::RubyIndexer::Entry::Parameter; end + +# A rest method parameter, e.g. `def foo(*a)` +# +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#275 +class RubyIndexer::Entry::RestParameter < ::RubyIndexer::Entry::Parameter + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#279 + sig { override.returns(::Symbol) } + def decorated_name; end +end + +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#276 +RubyIndexer::Entry::RestParameter::DEFAULT_NAME = T.let(T.unsafe(nil), Symbol) + +# Ruby doesn't support method overloading, so a method will have only one signature. +# However RBS can represent the concept of method overloading, with different return types based on the arguments +# passed, so we need to store all the signatures. +# +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#578 +class RubyIndexer::Entry::Signature + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#585 + sig { params(parameters: T::Array[::RubyIndexer::Entry::Parameter]).void } + def initialize(parameters); end + + # Returns a string with the decorated names of the parameters of this member. E.g.: `(a, b = 1, c: 2)` + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#591 + sig { returns(::String) } + def format; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#683 + sig { params(args: T.nilable(T::Array[::Prism::Node]), names: T::Array[::Symbol]).returns(T::Boolean) } + def keyword_arguments_match?(args, names); end + + # Returns `true` if the given call node arguments array matches this method signature. This method will prefer + # returning `true` for situations that cannot be analyzed statically, like the presence of splats, keyword splats + # or forwarding arguments. + # + # Since this method is used to detect which overload should be displayed in signature help, it will also return + # `true` if there are missing arguments since the user may not be done typing yet. For example: + # + # ```ruby + # def foo(a, b); end + # # All of the following are considered matches because the user might be in the middle of typing and we have to + # # show them the signature + # foo + # foo(1) + # foo(1, 2) + # ``` + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#611 + sig { params(arguments: T::Array[::Prism::Node]).returns(T::Boolean) } + def matches?(arguments); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#582 + sig { returns(T::Array[::RubyIndexer::Entry::Parameter]) } + def parameters; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#670 + sig do + params( + positional_args: T::Array[::Prism::Node], + forwarding_arguments: T::Array[::Prism::Node], + keyword_args: T.nilable(T::Array[::Prism::Node]), + min_pos: ::Integer, + max_pos: T.any(::Float, ::Integer) + ).returns(T::Boolean) + end + def positional_arguments_match?(positional_args, forwarding_arguments, keyword_args, min_pos, max_pos); end +end + +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#207 +class RubyIndexer::Entry::SingletonClass < ::RubyIndexer::Entry::Class + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#217 + sig do + params( + location: ::RubyIndexer::Location, + name_location: ::RubyIndexer::Location, + comments: T.nilable(::String) + ).void + end + def update_singleton_information(location, name_location, comments); end +end + +# An UnresolvedAlias points to a constant alias with a right hand side that has not yet been resolved. For +# example, if we find +# +# ```ruby +# CONST = Foo +# ``` +# Before we have discovered `Foo`, there's no way to eagerly resolve this alias to the correct target constant. +# All aliases are inserted as UnresolvedAlias in the index first and then we lazily resolve them to the correct +# target in [rdoc-ref:Index#resolve]. If the right hand side contains a constant that doesn't exist, then it's not +# possible to resolve the alias and it will remain an UnresolvedAlias until the right hand side constant exists +# +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#428 +class RubyIndexer::Entry::UnresolvedConstantAlias < ::RubyIndexer::Entry + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#447 + sig do + params( + target: ::String, + nesting: T::Array[::String], + name: ::String, + file_path: ::String, + location: ::RubyIndexer::Location, + comments: T.nilable(::String) + ).void + end + def initialize(target, nesting, name, file_path, location, comments); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#435 + sig { returns(T::Array[::String]) } + def nesting; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#432 + sig { returns(::String) } + def target; end +end + +# An unresolved method alias is an alias entry for which we aren't sure what the right hand side points to yet. For +# example, if we have `alias a b`, we create an unresolved alias for `a` because we aren't sure immediate what `b` +# is referring to +# +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#502 +class RubyIndexer::Entry::UnresolvedMethodAlias < ::RubyIndexer::Entry + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#521 + sig do + params( + new_name: ::String, + old_name: ::String, + owner: T.nilable(::RubyIndexer::Entry::Namespace), + file_path: ::String, + location: ::RubyIndexer::Location, + comments: T.nilable(::String) + ).void + end + def initialize(new_name, old_name, owner, file_path, location, comments); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#506 + sig { returns(::String) } + def new_name; end + + # @return [String] + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#506 + def old_name; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#509 + sig { returns(T.nilable(::RubyIndexer::Entry::Namespace)) } + def owner; end +end + +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#6 +class RubyIndexer::Entry::Visibility < ::T::Enum + enums do + PRIVATE = new + PROTECTED = new + PUBLIC = new + end +end + +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#5 +class RubyIndexer::Index + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#19 + sig { void } + def initialize; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#96 + sig { params(fully_qualified_name: ::String).returns(T.nilable(T::Array[::RubyIndexer::Entry])) } + def [](fully_qualified_name); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#87 + sig { params(entry: ::RubyIndexer::Entry, skip_prefix_tree: T::Boolean).void } + def add(entry, skip_prefix_tree: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#16 + sig { returns(::RubyIndexer::Configuration) } + def configuration; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#248 + sig do + params( + name: ::String, + nesting: T::Array[::String] + ).returns(T::Array[T::Array[T.any(::RubyIndexer::Entry::Constant, ::RubyIndexer::Entry::ConstantAlias, ::RubyIndexer::Entry::Namespace, ::RubyIndexer::Entry::UnresolvedConstantAlias)]]) + end + def constant_completion_candidates(name, nesting); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#59 + sig { params(indexable: ::RubyIndexer::IndexablePath).void } + def delete(indexable); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#634 + sig { returns(T::Boolean) } + def empty?; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#682 + sig do + type_parameters(:T) + .params( + path: ::String, + type: T.nilable(T::Class[T.all(::RubyIndexer::Entry, T.type_parameter(:T))]) + ).returns(T.nilable(T.any(T::Array[::RubyIndexer::Entry], T::Array[T.type_parameter(:T)]))) + end + def entries_for(path, type = T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#654 + sig { params(name: ::String).returns(::RubyIndexer::Entry::SingletonClass) } + def existing_or_new_singleton_class(name); end + + # Searches for a constant based on an unqualified name and returns the first possible match regardless of whether + # there are more possible matching entries + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#117 + sig do + params( + name: ::String + ).returns(T.nilable(T::Array[T.any(::RubyIndexer::Entry::Constant, ::RubyIndexer::Entry::ConstantAlias, ::RubyIndexer::Entry::Namespace, ::RubyIndexer::Entry::UnresolvedConstantAlias)])) + end + def first_unqualified_const(name); end + + # Follows aliases in a namespace. The algorithm keeps checking if the name is an alias and then recursively follows + # it. The idea is that we test the name in parts starting from the complete name to the first namespace. For + # `Foo::Bar::Baz`, we would test: + # 1. Is `Foo::Bar::Baz` an alias? Get the target and recursively follow its target + # 2. Is `Foo::Bar` an alias? Get the target and recursively follow its target + # 3. Is `Foo` an alias? Get the target and recursively follow its target + # + # If we find an alias, then we want to follow its target. In the same example, if `Foo::Bar` is an alias to + # `Something::Else`, then we first discover `Something::Else::Baz`. But `Something::Else::Baz` might contain other + # aliases, so we have to invoke `follow_aliased_namespace` again to check until we only return a real name + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#425 + sig { params(name: ::String, seen_names: T::Array[::String]).returns(::String) } + def follow_aliased_namespace(name, seen_names = T.unsafe(nil)); end + + # Fuzzy searches index entries based on Jaro-Winkler similarity. If no query is provided, all entries are returned + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#166 + sig { params(query: T.nilable(::String)).returns(T::Array[::RubyIndexer::Entry]) } + def fuzzy_search(query); end + + # Synchronizes a change made to the given indexable path. This method will ensure that new declarations are indexed, + # removed declarations removed and that the ancestor linearization cache is cleared if necessary + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#606 + sig { params(indexable: ::RubyIndexer::IndexablePath).void } + def handle_change(indexable); end + + # Index all files for the given indexable paths, which defaults to what is configured. A block can be used to track + # and control indexing progress. That block is invoked with the current progress percentage and should return `true` + # to continue indexing or `false` to stop indexing. + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#354 + sig do + params( + indexable_paths: T::Array[::RubyIndexer::IndexablePath], + block: T.nilable(T.proc.params(progress: ::Integer).returns(T::Boolean)) + ).void + end + def index_all(indexable_paths: T.unsafe(nil), &block); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#379 + sig do + params( + indexable_path: ::RubyIndexer::IndexablePath, + source: T.nilable(::String), + collect_comments: T::Boolean + ).void + end + def index_single(indexable_path, source = T.unsafe(nil), collect_comments: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#644 + sig { params(name: ::String).returns(T::Boolean) } + def indexed?(name); end + + # Returns a list of possible candidates for completion of instance variables for a given owner name. The name must + # include the `@` prefix + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#594 + sig { params(name: ::String, owner_name: ::String).returns(T::Array[::RubyIndexer::Entry::InstanceVariable]) } + def instance_variable_completion_candidates(name, owner_name); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#649 + sig { returns(::Integer) } + def length; end + + # Linearizes the ancestors for a given name, returning the order of namespaces in which Ruby will search for method + # or constant declarations. + # + # When we add an ancestor in Ruby, that namespace might have ancestors of its own. Therefore, we need to linearize + # everything recursively to ensure that we are placing ancestors in the right order. For example, if you include a + # module that prepends another module, then the prepend module appears before the included module. + # + # The order of ancestors is [linearized_prepends, self, linearized_includes, linearized_superclass] + # + # @raise [NonExistingNamespaceError] + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#503 + sig { params(fully_qualified_name: ::String).returns(T::Array[::String]) } + def linearized_ancestors_of(fully_qualified_name); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#195 + sig do + params( + name: T.nilable(::String), + receiver_name: ::String + ).returns(T::Array[T.any(::RubyIndexer::Entry::Member, ::RubyIndexer::Entry::MethodAlias)]) + end + def method_completion_candidates(name, receiver_name); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#639 + sig { returns(T::Array[::String]) } + def names; end + + # Searches entries in the index based on an exact prefix, intended for providing autocomplete. All possible matches + # to the prefix are returned. The return is an array of arrays, where each entry is the array of entries for a given + # name match. For example: + # ## Example + # ```ruby + # # If the index has two entries for `Foo::Bar` and one for `Foo::Baz`, then: + # index.prefix_search("Foo::B") + # # Will return: + # [ + # [#, #], + # [#], + # ] + # ``` + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#147 + sig do + params( + query: ::String, + nesting: T.nilable(T::Array[::String]) + ).returns(T::Array[T::Array[::RubyIndexer::Entry]]) + end + def prefix_search(query, nesting = T.unsafe(nil)); end + + # Register an included `hook` that will be executed when `module_name` is included into any namespace + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#54 + sig do + params( + module_name: ::String, + hook: T.proc.params(index: ::RubyIndexer::Index, base: ::RubyIndexer::Entry::Namespace).void + ).void + end + def register_included_hook(module_name, &hook); end + + # Resolve a constant to its declaration based on its name and the nesting where the reference was found. Parameter + # documentation: + # + # name: the name of the reference how it was found in the source code (qualified or not) + # nesting: the nesting structure where the reference was found (e.g.: ["Foo", "Bar"]) + # seen_names: this parameter should not be used by consumers of the api. It is used to avoid infinite recursion when + # resolving circular references + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#313 + sig do + params( + name: ::String, + nesting: T::Array[::String], + seen_names: T::Array[::String] + ).returns(T.nilable(T::Array[T.any(::RubyIndexer::Entry::ConstantAlias, ::RubyIndexer::Entry::Namespace, ::RubyIndexer::Entry::UnresolvedConstantAlias)])) + end + def resolve(name, nesting, seen_names = T.unsafe(nil)); end + + # Resolves an instance variable name for a given owner name. This method will linearize the ancestors of the owner + # and find inherited instance variables as well + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#581 + sig do + params( + variable_name: ::String, + owner_name: ::String + ).returns(T.nilable(T::Array[::RubyIndexer::Entry::InstanceVariable])) + end + def resolve_instance_variable(variable_name, owner_name); end + + # Attempts to find methods for a resolved fully qualified receiver name. Do not provide the `seen_names` parameter + # as it is used only internally to prevent infinite loops when resolving circular aliases + # Returns `nil` if the method does not exist on that receiver + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#465 + sig do + params( + method_name: ::String, + receiver_name: ::String, + seen_names: T::Array[::String], + inherited_only: T::Boolean + ).returns(T.nilable(T::Array[T.any(::RubyIndexer::Entry::Member, ::RubyIndexer::Entry::MethodAlias)])) + end + def resolve_method(method_name, receiver_name, seen_names = T.unsafe(nil), inherited_only: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#101 + sig { params(query: ::String).returns(T::Array[::RubyIndexer::IndexablePath]) } + def search_require_paths(query); end + + private + + # Removes redundancy from a constant reference's full name. For example, if we find a reference to `A::B::Foo` + # inside of the ["A", "B"] nesting, then we should not concatenate the nesting with the name or else we'll end up + # with `A::B::A::B::Foo`. This method will remove any redundant parts from the final name based on the reference and + # the nesting + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#982 + sig { params(name: ::String, nesting: T::Array[::String]).returns(::String) } + def build_non_redundant_full_name(name, nesting); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#1014 + sig do + params( + full_name: ::String, + seen_names: T::Array[::String] + ).returns(T.nilable(T::Array[T.any(::RubyIndexer::Entry::ConstantAlias, ::RubyIndexer::Entry::Namespace, ::RubyIndexer::Entry::UnresolvedConstantAlias)])) + end + def direct_or_aliased_constant(full_name, seen_names); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#943 + sig do + params( + name: T.nilable(::String), + nesting: T::Array[::String] + ).returns(T::Array[T::Array[T.any(::RubyIndexer::Entry::Constant, ::RubyIndexer::Entry::ConstantAlias, ::RubyIndexer::Entry::Namespace, ::RubyIndexer::Entry::UnresolvedConstantAlias)]]) + end + def inherited_constant_completion_candidates(name, nesting); end + + # Linearize mixins for an array of namespace entries. This method will mutate the `ancestors` array with the + # linearized ancestors of the mixins + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#728 + sig do + params( + ancestors: T::Array[::String], + namespace_entries: T::Array[::RubyIndexer::Entry::Namespace], + nesting: T::Array[::String] + ).void + end + def linearize_mixins(ancestors, namespace_entries, nesting); end + + # Linearize the superclass of a given namespace (including modules with the implicit `Module` superclass). This + # method will mutate the `ancestors` array with the linearized ancestors of the superclass + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#778 + sig do + params( + ancestors: T::Array[::String], + attached_class_name: ::String, + fully_qualified_name: ::String, + namespace_entries: T::Array[::RubyIndexer::Entry::Namespace], + nesting: T::Array[::String], + singleton_levels: ::Integer + ).void + end + def linearize_superclass(ancestors, attached_class_name, fully_qualified_name, namespace_entries, nesting, singleton_levels); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#913 + sig do + params( + name: ::String, + nesting: T::Array[::String], + seen_names: T::Array[::String] + ).returns(T.nilable(T::Array[T.any(::RubyIndexer::Entry::ConstantAlias, ::RubyIndexer::Entry::Namespace, ::RubyIndexer::Entry::UnresolvedConstantAlias)])) + end + def lookup_ancestor_chain(name, nesting, seen_names); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#884 + sig do + params( + name: ::String, + nesting: T::Array[::String], + seen_names: T::Array[::String] + ).returns(T.nilable(T::Array[T.any(::RubyIndexer::Entry::ConstantAlias, ::RubyIndexer::Entry::Namespace, ::RubyIndexer::Entry::UnresolvedConstantAlias)])) + end + def lookup_enclosing_scopes(name, nesting, seen_names); end + + # Attempts to resolve an UnresolvedAlias into a resolved Alias. If the unresolved alias is pointing to a constant + # that doesn't exist, then we return the same UnresolvedAlias + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#851 + sig do + params( + entry: ::RubyIndexer::Entry::UnresolvedConstantAlias, + seen_names: T::Array[::String] + ).returns(T.any(::RubyIndexer::Entry::ConstantAlias, ::RubyIndexer::Entry::UnresolvedConstantAlias)) + end + def resolve_alias(entry, seen_names); end + + # Attempt to resolve a given unresolved method alias. This method returns the resolved alias if we managed to + # identify the target or the same unresolved alias entry if we couldn't + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#1036 + sig do + params( + entry: ::RubyIndexer::Entry::UnresolvedMethodAlias, + receiver_name: ::String, + seen_names: T::Array[::String] + ).returns(T.any(::RubyIndexer::Entry::MethodAlias, ::RubyIndexer::Entry::UnresolvedMethodAlias)) + end + def resolve_method_alias(entry, receiver_name, seen_names); end + + # Runs the registered included hooks + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#693 + sig { params(fully_qualified_name: ::String, nesting: T::Array[::String]).void } + def run_included_hooks(fully_qualified_name, nesting); end +end + +# The minimum Jaro-Winkler similarity score for an entry to be considered a match for a given fuzzy search query +# +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#13 +RubyIndexer::Index::ENTRY_SIMILARITY_THRESHOLD = T.let(T.unsafe(nil), Float) + +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#10 +class RubyIndexer::Index::IndexNotEmptyError < ::StandardError; end + +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#9 +class RubyIndexer::Index::NonExistingNamespaceError < ::StandardError; end + +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#8 +class RubyIndexer::Index::UnresolvableAliasError < ::StandardError; end + +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/indexable_path.rb#5 +class RubyIndexer::IndexablePath + # An IndexablePath is instantiated with a load_path_entry and a full_path. The load_path_entry is where the file can + # be found in the $LOAD_PATH, which we use to determine the require_path. The load_path_entry may be `nil` if the + # indexer is configured to go through files that do not belong in the $LOAD_PATH. For example, + # `sorbet/tapioca/require.rb` ends up being a part of the paths to be indexed because it's a Ruby file inside the + # project, but the `sorbet` folder is not a part of the $LOAD_PATH. That means that both its load_path_entry and + # require_path will be `nil`, since it cannot be required by the project + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/indexable_path.rb#21 + sig { params(load_path_entry: T.nilable(::String), full_path: ::String).void } + def initialize(load_path_entry, full_path); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/indexable_path.rb#12 + sig { returns(::String) } + def full_path; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/indexable_path.rb#9 + sig { returns(T.nilable(::String)) } + def require_path; end +end + +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/location.rb#5 +class RubyIndexer::Location + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/location.rb#41 + sig { params(start_line: ::Integer, end_line: ::Integer, start_column: ::Integer, end_column: ::Integer).void } + def initialize(start_line, end_line, start_column, end_column); end + + # @return [Integer] + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/location.rb#31 + def end_column; end + + # @return [Integer] + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/location.rb#31 + def end_line; end + + # @return [Integer] + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/location.rb#31 + def start_column; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/location.rb#31 + sig { returns(::Integer) } + def start_line; end + + class << self + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/location.rb#20 + sig do + params( + prism_location: ::Prism::Location, + code_units_cache: T.any(::Prism::CodeUnitsCache, T.proc.params(arg0: ::Integer).returns(::Integer)) + ).returns(T.attached_class) + end + def from_prism_location(prism_location, code_units_cache); end + end +end + +# A PrefixTree is a data structure that allows searching for partial strings fast. The tree is similar to a nested +# hash structure, where the keys are the characters of the inserted strings. +# +# ## Example +# ```ruby +# tree = PrefixTree[String].new +# # Insert entries using the same key and value +# tree.insert("bar", "bar") +# tree.insert("baz", "baz") +# # Internally, the structure is analogous to this, but using nodes: +# # { +# # "b" => { +# # "a" => { +# # "r" => "bar", +# # "z" => "baz" +# # } +# # } +# # } +# # When we search it, it finds all possible values based on partial (or complete matches): +# tree.search("") # => ["bar", "baz"] +# tree.search("b") # => ["bar", "baz"] +# tree.search("ba") # => ["bar", "baz"] +# tree.search("bar") # => ["bar"] +# ``` +# +# A PrefixTree is useful for autocomplete, since we always want to find all alternatives while the developer hasn't +# finished typing yet. This PrefixTree implementation allows for string keys and any arbitrary value using the generic +# `Value` type. +# +# See https://en.wikipedia.org/wiki/Trie for more information +# +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/prefix_tree.rb#35 +class RubyIndexer::PrefixTree + extend T::Generic + + Value = type_member + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/prefix_tree.rb#42 + sig { void } + def initialize; end + + # Deletes the entry identified by `key` from the tree. Notice that a partial match will still delete all entries + # that match it. For example, if the tree contains `foo` and we ask to delete `fo`, then `foo` will be deleted + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/prefix_tree.rb#77 + sig { params(key: ::String).void } + def delete(key); end + + # Inserts a `value` using the given `key` + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/prefix_tree.rb#60 + sig { params(key: ::String, value: Value).void } + def insert(key, value); end + + # Search the PrefixTree based on a given `prefix`. If `foo` is an entry in the tree, then searching for `fo` will + # return it as a result. The result is always an array of the type of value attribute to the generic `Value` type. + # Notice that if the `Value` is an array, this method will return an array of arrays, where each entry is the array + # of values for a given match + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/prefix_tree.rb#51 + sig { params(prefix: ::String).returns(T::Array[Value]) } + def search(prefix); end + + private + + # Find a node that matches the given `key` + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/prefix_tree.rb#97 + sig { params(key: ::String).returns(T.nilable(RubyIndexer::PrefixTree::Node[Value])) } + def find_node(key); end +end + +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/prefix_tree.rb#110 +class RubyIndexer::PrefixTree::Node + extend T::Generic + + Value = type_member + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/prefix_tree.rb#132 + sig { params(key: ::String, value: Value, parent: T.nilable(RubyIndexer::PrefixTree::Node[Value])).void } + def initialize(key, value, parent = T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/prefix_tree.rb#117 + sig { returns(T::Hash[::String, RubyIndexer::PrefixTree::Node[Value]]) } + def children; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/prefix_tree.rb#141 + sig { returns(T::Array[Value]) } + def collect; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/prefix_tree.rb#120 + sig { returns(::String) } + def key; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/prefix_tree.rb#126 + sig { returns(T::Boolean) } + def leaf; end + + # @return [Boolean] + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/prefix_tree.rb#126 + def leaf=(_arg0); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/prefix_tree.rb#129 + sig { returns(T.nilable(RubyIndexer::PrefixTree::Node[Value])) } + def parent; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/prefix_tree.rb#123 + sig { returns(Value) } + def value; end + + # @return [Value] + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/prefix_tree.rb#123 + def value=(_arg0); end +end + +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#5 +class RubyIndexer::RBSIndexer + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#11 + sig { params(index: ::RubyIndexer::Index).void } + def initialize(index); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#16 + sig { void } + def index_ruby_core; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#31 + sig { params(pathname: ::Pathname, declarations: T::Array[::RBS::AST::Declarations::Base]).void } + def process_signature(pathname, declarations); end + + private + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#100 + sig do + params( + declaration: T.any(::RBS::AST::Declarations::Class, ::RBS::AST::Declarations::Module), + entry: ::RubyIndexer::Entry::Namespace + ).void + end + def add_declaration_mixins_to_entry(declaration, entry); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#316 + sig do + params( + declaration: T.any(::RBS::AST::Declarations::Class, ::RBS::AST::Declarations::Constant, ::RBS::AST::Declarations::Global, ::RBS::AST::Declarations::Module, ::RBS::AST::Members::Alias, ::RBS::AST::Members::MethodDefinition) + ).returns(T.nilable(::String)) + end + def comments_to_string(declaration); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#57 + sig do + params( + declaration: T.any(::RBS::AST::Declarations::Class, ::RBS::AST::Declarations::Module), + pathname: ::Pathname + ).void + end + def handle_class_or_module_declaration(declaration, pathname); end + + # RBS treats constant definitions differently depend on where they are defined. + # When constants' rbs are defined inside a class/module block, they are treated as + # members of the class/module. + # + # module Encoding + # US_ASCII = ... # US_ASCII is a member of Encoding + # end + # + # When constants' rbs are defined outside a class/module block, they are treated as + # top-level constants. + # + # Complex::I = ... # Complex::I is a top-level constant + # + # And we need to handle their nesting differently. + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#264 + sig do + params( + declaration: ::RBS::AST::Declarations::Constant, + nesting: T::Array[::String], + file_path: ::String + ).void + end + def handle_constant(declaration, nesting, file_path); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#275 + sig { params(declaration: ::RBS::AST::Declarations::Global, pathname: ::Pathname).void } + def handle_global_variable(declaration, pathname); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#116 + sig { params(member: ::RBS::AST::Members::MethodDefinition, owner: ::RubyIndexer::Entry::Namespace).void } + def handle_method(member, owner); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#290 + sig { params(member: ::RBS::AST::Members::Alias, owner_entry: ::RubyIndexer::Entry::Namespace).void } + def handle_signature_alias(member, owner_entry); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#175 + sig { params(function: ::RBS::Types::Function).returns(T::Array[::RubyIndexer::Entry::Parameter]) } + def parse_arguments(function); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#40 + sig { params(declaration: ::RBS::AST::Declarations::Base, pathname: ::Pathname).void } + def process_declaration(declaration, pathname); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#234 + sig { params(function: ::RBS::Types::Function).returns(T::Array[::RubyIndexer::Entry::OptionalKeywordParameter]) } + def process_optional_keywords(function); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#154 + sig do + params( + overload: ::RBS::AST::Members::MethodDefinition::Overload + ).returns(T::Array[::RubyIndexer::Entry::Parameter]) + end + def process_overload(overload); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#187 + sig { params(function: ::RBS::Types::Function).returns(T::Array[::RubyIndexer::Entry::RequiredParameter]) } + def process_required_and_optional_positionals(function); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#227 + sig { params(function: ::RBS::Types::Function).returns(T::Array[::RubyIndexer::Entry::KeywordParameter]) } + def process_required_keywords(function); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#241 + sig { params(function: ::RBS::Types::Function).returns(::RubyIndexer::Entry::KeywordRestParameter) } + def process_rest_keywords(function); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#218 + sig { params(function: ::RBS::Types::Function).returns(::RubyIndexer::Entry::RestParameter) } + def process_rest_positionals(function); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#211 + sig { params(function: ::RBS::Types::Function).returns(T::Array[::RubyIndexer::Entry::OptionalParameter]) } + def process_trailing_positionals(function); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#146 + sig { params(member: ::RBS::AST::Members::MethodDefinition).returns(T::Array[::RubyIndexer::Entry::Signature]) } + def signatures(member); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#85 + sig { params(rbs_location: ::RBS::Location).returns(::RubyIndexer::Location) } + def to_ruby_indexer_location(rbs_location); end +end + +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#8 +RubyIndexer::RBSIndexer::HAS_UNTYPED_FUNCTION = T.let(T.unsafe(nil), TrueClass) + +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#5 +class RubyIndexer::ReferenceFinder + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#68 + sig do + params( + target: ::RubyIndexer::ReferenceFinder::Target, + index: ::RubyIndexer::Index, + dispatcher: ::Prism::Dispatcher, + include_declarations: T::Boolean + ).void + end + def initialize(target, index, dispatcher, include_declarations: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#266 + sig { params(node: ::Prism::CallNode).void } + def on_call_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#109 + sig { params(node: ::Prism::ClassNode).void } + def on_class_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#122 + sig { params(node: ::Prism::ClassNode).void } + def on_class_node_leave(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#238 + sig { params(node: ::Prism::ConstantAndWriteNode).void } + def on_constant_and_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#243 + sig { params(node: ::Prism::ConstantOperatorWriteNode).void } + def on_constant_operator_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#233 + sig { params(node: ::Prism::ConstantOrWriteNode).void } + def on_constant_or_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#217 + sig { params(node: ::Prism::ConstantPathAndWriteNode).void } + def on_constant_path_and_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#158 + sig { params(node: ::Prism::ConstantPathNode).void } + def on_constant_path_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#206 + sig { params(node: ::Prism::ConstantPathOperatorWriteNode).void } + def on_constant_path_operator_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#195 + sig { params(node: ::Prism::ConstantPathOrWriteNode).void } + def on_constant_path_or_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#184 + sig { params(node: ::Prism::ConstantPathWriteNode).void } + def on_constant_path_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#166 + sig { params(node: ::Prism::ConstantReadNode).void } + def on_constant_read_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#228 + sig { params(node: ::Prism::ConstantWriteNode).void } + def on_constant_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#248 + sig { params(node: ::Prism::DefNode).void } + def on_def_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#259 + sig { params(node: ::Prism::DefNode).void } + def on_def_node_leave(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#127 + sig { params(node: ::Prism::ModuleNode).void } + def on_module_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#140 + sig { params(node: ::Prism::ModuleNode).void } + def on_module_node_leave(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#174 + sig { params(node: ::Prism::MultiWriteNode).void } + def on_multi_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#145 + sig { params(node: ::Prism::SingletonClassNode).void } + def on_singleton_class_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#153 + sig { params(node: ::Prism::SingletonClassNode).void } + def on_singleton_class_node_leave(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#102 + sig { returns(T::Array[::RubyIndexer::ReferenceFinder::Reference]) } + def references; end + + private + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#275 + sig { params(name: ::String).returns(T::Array[::String]) } + def actual_nesting(name); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#289 + sig { params(name: ::String, location: ::Prism::Location).void } + def collect_constant_references(name, location); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#317 + sig do + params( + node: T.any(::Prism::ConstantPathNode, ::Prism::ConstantPathTargetNode, ::Prism::ConstantReadNode) + ).returns(T.nilable(::String)) + end + def constant_name(node); end +end + +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#14 +class RubyIndexer::ReferenceFinder::ConstTarget < ::RubyIndexer::ReferenceFinder::Target + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#21 + sig { params(fully_qualified_name: ::String).void } + def initialize(fully_qualified_name); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#18 + sig { returns(::String) } + def fully_qualified_name; end +end + +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#27 +class RubyIndexer::ReferenceFinder::MethodTarget < ::RubyIndexer::ReferenceFinder::Target + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#34 + sig { params(method_name: ::String).void } + def initialize(method_name); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#31 + sig { returns(::String) } + def method_name; end +end + +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#40 +class RubyIndexer::ReferenceFinder::Reference + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#53 + sig { params(name: ::String, location: ::Prism::Location, declaration: T::Boolean).void } + def initialize(name, location, declaration:); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#50 + sig { returns(T::Boolean) } + def declaration; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#47 + sig { returns(::Prism::Location) } + def location; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#44 + sig { returns(::String) } + def name; end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#8 +class RubyIndexer::ReferenceFinder::Target + abstract! +end + +# source://ruby-lsp/lib/ruby-lsp.rb#4 +module RubyLsp; end + +# To register an add-on, inherit from this class and implement both `name` and `activate` +# +# # Example +# +# ```ruby +# module MyGem +# class MyAddon < Addon +# def activate +# # Perform any relevant initialization +# end +# +# def name +# "My add-on name" +# end +# end +# end +# ``` +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://ruby-lsp/lib/ruby_lsp/addon.rb#22 +class RubyLsp::Addon + abstract! + + # source://ruby-lsp/lib/ruby_lsp/addon.rb#150 + sig { void } + def initialize; end + + # Each add-on should implement `MyAddon#activate` and use to perform any sort of initialization, such as + # reading information into memory or even spawning a separate process + # + # @abstract + # + # source://ruby-lsp/lib/ruby_lsp/addon.rb#181 + sig { abstract.params(global_state: ::RubyLsp::GlobalState, outgoing_queue: ::Thread::Queue).void } + def activate(global_state, outgoing_queue); end + + # source://ruby-lsp/lib/ruby_lsp/addon.rb#155 + sig { params(error: ::StandardError).returns(T.self_type) } + def add_error(error); end + + # Creates a new CodeLens listener. This method is invoked on every CodeLens request + # + # source://ruby-lsp/lib/ruby_lsp/addon.rb#212 + sig do + overridable + .params( + response_builder: RubyLsp::ResponseBuilders::CollectionResponseBuilder[::LanguageServer::Protocol::Interface::CodeLens], + uri: ::URI::Generic, + dispatcher: ::Prism::Dispatcher + ).void + end + def create_code_lens_listener(response_builder, uri, dispatcher); end + + # Creates a new Completion listener. This method is invoked on every Completion request + # + # source://ruby-lsp/lib/ruby_lsp/addon.rb#264 + sig do + overridable + .params( + response_builder: RubyLsp::ResponseBuilders::CollectionResponseBuilder[::LanguageServer::Protocol::Interface::CompletionItem], + node_context: ::RubyLsp::NodeContext, + dispatcher: ::Prism::Dispatcher, + uri: ::URI::Generic + ).void + end + def create_completion_listener(response_builder, node_context, dispatcher, uri); end + + # Creates a new Definition listener. This method is invoked on every Definition request + # + # source://ruby-lsp/lib/ruby_lsp/addon.rb#253 + sig do + overridable + .params( + response_builder: RubyLsp::ResponseBuilders::CollectionResponseBuilder[T.any(::LanguageServer::Protocol::Interface::Location, ::LanguageServer::Protocol::Interface::LocationLink)], + uri: ::URI::Generic, + node_context: ::RubyLsp::NodeContext, + dispatcher: ::Prism::Dispatcher + ).void + end + def create_definition_listener(response_builder, uri, node_context, dispatcher); end + + # Creates a new DocumentSymbol listener. This method is invoked on every DocumentSymbol request + # + # source://ruby-lsp/lib/ruby_lsp/addon.rb#231 + sig do + overridable + .params( + response_builder: RubyLsp::ResponseBuilders::DocumentSymbol, + dispatcher: ::Prism::Dispatcher + ).void + end + def create_document_symbol_listener(response_builder, dispatcher); end + + # Creates a new Hover listener. This method is invoked on every Hover request + # + # source://ruby-lsp/lib/ruby_lsp/addon.rb#222 + sig do + overridable + .params( + response_builder: RubyLsp::ResponseBuilders::Hover, + node_context: ::RubyLsp::NodeContext, + dispatcher: ::Prism::Dispatcher + ).void + end + def create_hover_listener(response_builder, node_context, dispatcher); end + + # source://ruby-lsp/lib/ruby_lsp/addon.rb#239 + sig do + overridable + .params( + response_builder: RubyLsp::ResponseBuilders::SemanticHighlighting, + dispatcher: ::Prism::Dispatcher + ).void + end + def create_semantic_highlighting_listener(response_builder, dispatcher); end + + # Each add-on should implement `MyAddon#deactivate` and use to perform any clean up, like shutting down a + # child process + # + # @abstract + # + # source://ruby-lsp/lib/ruby_lsp/addon.rb#186 + sig { abstract.void } + def deactivate; end + + # source://ruby-lsp/lib/ruby_lsp/addon.rb#161 + sig { returns(T::Boolean) } + def error?; end + + # source://ruby-lsp/lib/ruby_lsp/addon.rb#174 + sig { returns(::String) } + def errors_details; end + + # source://ruby-lsp/lib/ruby_lsp/addon.rb#166 + sig { returns(::String) } + def formatted_errors; end + + # Handle a response from a window/showMessageRequest request. Add-ons must include the addon_name as part of the + # original request so that the response is delegated to the correct add-on and must override this method to handle + # the response + # https://microsoft.github.io/language-server-protocol/specification#window_showMessageRequest + # + # source://ruby-lsp/lib/ruby_lsp/addon.rb#202 + sig { overridable.params(title: ::String).void } + def handle_window_show_message_response(title); end + + # Add-ons should override the `name` method to return the add-on name + # + # @abstract + # + # source://ruby-lsp/lib/ruby_lsp/addon.rb#190 + sig { abstract.returns(::String) } + def name; end + + # Add-ons should override the `version` method to return a semantic version string representing the add-on's + # version. This is used for compatibility checks + # + # @abstract + # + # source://ruby-lsp/lib/ruby_lsp/addon.rb#195 + sig { abstract.returns(::String) } + def version; end + + class << self + # source://ruby-lsp/lib/ruby_lsp/addon.rb#47 + sig { returns(T::Array[T.class_of(RubyLsp::Addon)]) } + def addon_classes; end + + # source://ruby-lsp/lib/ruby_lsp/addon.rb#41 + sig { returns(T::Array[::RubyLsp::Addon]) } + def addons; end + + # @return [Array] + # + # source://ruby-lsp/lib/ruby_lsp/addon.rb#41 + def addons=(_arg0); end + + # Depend on a specific version of the Ruby LSP. This method should only be used if the add-on is distributed in a + # gem that does not have a runtime dependency on the ruby-lsp gem. This method should be invoked at the top of the + # `addon.rb` file before defining any classes or requiring any files. For example: + # + # ```ruby + # RubyLsp::Addon.depend_on_ruby_lsp!(">= 0.18.0") + # + # module MyGem + # class MyAddon < RubyLsp::Addon + # # ... + # end + # end + # ``` + # + # source://ruby-lsp/lib/ruby_lsp/addon.rb#139 + sig { params(version_constraints: ::String).void } + def depend_on_ruby_lsp!(*version_constraints); end + + # source://ruby-lsp/lib/ruby_lsp/addon.rb#44 + sig { returns(T::Array[::RubyLsp::Addon]) } + def file_watcher_addons; end + + # @return [Array] + # + # source://ruby-lsp/lib/ruby_lsp/addon.rb#44 + def file_watcher_addons=(_arg0); end + + # Get a reference to another add-on object by name and version. If an add-on exports an API that can be used by + # other add-ons, this is the way to get access to that API. + # + # Important: if the add-on is not found, AddonNotFoundError will be raised. If the add-on is found, but its + # current version does not satisfy the given version constraint, then IncompatibleApiError will be raised. It is + # the responsibility of the add-ons using this API to handle these errors appropriately. + # + # @raise [AddonNotFoundError] + # + # source://ruby-lsp/lib/ruby_lsp/addon.rb#107 + sig { params(addon_name: ::String, version_constraints: ::String).returns(::RubyLsp::Addon) } + def get(addon_name, *version_constraints); end + + # Automatically track and instantiate add-on classes + # + # source://ruby-lsp/lib/ruby_lsp/addon.rb#51 + sig { params(child_class: T.class_of(RubyLsp::Addon)).void } + def inherited(child_class); end + + # Discovers and loads all add-ons. Returns a list of errors when trying to require add-ons + # + # source://ruby-lsp/lib/ruby_lsp/addon.rb#64 + sig do + params( + global_state: ::RubyLsp::GlobalState, + outgoing_queue: ::Thread::Queue, + include_project_addons: T::Boolean + ).returns(T::Array[::StandardError]) + end + def load_addons(global_state, outgoing_queue, include_project_addons: T.unsafe(nil)); end + end +end + +# source://ruby-lsp/lib/ruby_lsp/addon.rb#33 +class RubyLsp::Addon::AddonNotFoundError < ::StandardError; end + +# source://ruby-lsp/lib/ruby_lsp/addon.rb#35 +class RubyLsp::Addon::IncompatibleApiError < ::StandardError; end + +# Used to indicate that a request shouldn't return a response +# +# source://ruby-lsp/lib/ruby_lsp/utils.rb#12 +RubyLsp::BUNDLE_PATH = T.let(T.unsafe(nil), String) + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://ruby-lsp/lib/ruby_lsp/base_server.rb#5 +class RubyLsp::BaseServer + abstract! + + # source://ruby-lsp/lib/ruby_lsp/base_server.rb#12 + sig { params(options: T.untyped).void } + def initialize(**options); end + + # source://ruby-lsp/lib/ruby_lsp/base_server.rb#143 + sig { params(id: ::Integer, message: ::String, type: ::Integer).void } + def fail_request_and_notify(id, message, type: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_lsp/base_server.rb#149 + sig { returns(::Thread) } + def new_worker; end + + # This method is only intended to be used in tests! Pops the latest response that would be sent to the client + # + # source://ruby-lsp/lib/ruby_lsp/base_server.rb#132 + sig { returns(T.untyped) } + def pop_response; end + + # @abstract + # + # source://ruby-lsp/lib/ruby_lsp/base_server.rb#137 + sig { abstract.params(message: T::Hash[::Symbol, T.untyped]).void } + def process_message(message); end + + # source://ruby-lsp/lib/ruby_lsp/base_server.rb#118 + sig { void } + def run_shutdown; end + + # source://ruby-lsp/lib/ruby_lsp/base_server.rb#180 + sig { params(id: ::Integer).void } + def send_empty_response(id); end + + # source://ruby-lsp/lib/ruby_lsp/base_server.rb#185 + sig { params(message: ::String, type: ::Integer).void } + def send_log_message(message, type: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_lsp/base_server.rb#169 + sig { params(message: T.any(::RubyLsp::Error, ::RubyLsp::Notification, ::RubyLsp::Request, ::RubyLsp::Result)).void } + def send_message(message); end + + # @abstract + # + # source://ruby-lsp/lib/ruby_lsp/base_server.rb#140 + sig { abstract.void } + def shutdown; end + + # source://ruby-lsp/lib/ruby_lsp/base_server.rb#46 + sig { void } + def start; end +end + +# This class stores all client capabilities that the Ruby LSP and its add-ons depend on to ensure that we're +# not enabling functionality unsupported by the editor connecting to the server +# +# source://ruby-lsp/lib/ruby_lsp/client_capabilities.rb#7 +class RubyLsp::ClientCapabilities + # source://ruby-lsp/lib/ruby_lsp/client_capabilities.rb#17 + sig { void } + def initialize; end + + # source://ruby-lsp/lib/ruby_lsp/client_capabilities.rb#38 + sig { params(capabilities: T::Hash[::Symbol, T.untyped]).void } + def apply_client_capabilities(capabilities); end + + # @return [Boolean] + # + # source://ruby-lsp/lib/ruby_lsp/client_capabilities.rb#11 + def supports_progress; end + + # source://ruby-lsp/lib/ruby_lsp/client_capabilities.rb#63 + sig { returns(T::Boolean) } + def supports_rename?; end + + # @return [Boolean] + # + # source://ruby-lsp/lib/ruby_lsp/client_capabilities.rb#11 + def supports_request_delegation; end + + # source://ruby-lsp/lib/ruby_lsp/client_capabilities.rb#11 + sig { returns(T::Boolean) } + def supports_watching_files; end + + # @return [Boolean] + # + # source://ruby-lsp/lib/ruby_lsp/client_capabilities.rb#11 + def window_show_message_supports_extra_properties; end +end + +# source://ruby-lsp/lib/ruby_lsp/utils.rb#7 +RubyLsp::Constant = LanguageServer::Protocol::Constant + +# Request delegation for embedded languages is not yet standardized into the language server specification. Here we +# use this custom error class as a way to return a signal to the client that the request should be delegated to the +# language server for the host language. The support for delegation is custom built on the client side, so each editor +# needs to implement their own until this becomes a part of the spec +# +# source://ruby-lsp/lib/ruby_lsp/utils.rb#34 +class RubyLsp::DelegateRequestError < ::StandardError; end + +# A custom error code that clients can use to handle delegate requests. This is past the range of error codes listed +# by the specification to avoid conflicting with other error types +# +# source://ruby-lsp/lib/ruby_lsp/utils.rb#37 +RubyLsp::DelegateRequestError::CODE = T.let(T.unsafe(nil), Integer) + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://ruby-lsp/lib/ruby_lsp/document.rb#5 +class RubyLsp::Document + extend T::Generic + + abstract! + + ParseResultType = type_member + + # source://ruby-lsp/lib/ruby_lsp/document.rb#46 + sig { params(source: ::String, version: ::Integer, uri: ::URI::Generic, encoding: ::Encoding).void } + def initialize(source:, version:, uri:, encoding: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_lsp/document.rb#59 + sig { params(other: RubyLsp::Document[T.untyped]).returns(T::Boolean) } + def ==(other); end + + # TODO: remove this method once all non-positional requests have been migrated to the listener pattern + # + # source://ruby-lsp/lib/ruby_lsp/document.rb#74 + sig do + type_parameters(:T) + .params( + request_name: ::String, + block: T.proc.params(document: RubyLsp::Document[ParseResultType]).returns(T.type_parameter(:T)) + ).returns(T.type_parameter(:T)) + end + def cache_fetch(request_name, &block); end + + # source://ruby-lsp/lib/ruby_lsp/document.rb#89 + sig { params(request_name: ::String).returns(T.untyped) } + def cache_get(request_name); end + + # source://ruby-lsp/lib/ruby_lsp/document.rb#84 + sig { type_parameters(:T).params(request_name: ::String, value: T.type_parameter(:T)).returns(T.type_parameter(:T)) } + def cache_set(request_name, value); end + + # source://ruby-lsp/lib/ruby_lsp/document.rb#118 + sig { returns(::RubyLsp::Document::Scanner) } + def create_scanner; end + + # source://ruby-lsp/lib/ruby_lsp/document.rb#40 + sig { returns(::Encoding) } + def encoding; end + + # @abstract + # + # source://ruby-lsp/lib/ruby_lsp/document.rb#64 + sig { abstract.returns(::RubyLsp::Document::LanguageId) } + def language_id; end + + # Returns `true` if the document was parsed and `false` if nothing needed parsing + # + # @abstract + # + # source://ruby-lsp/lib/ruby_lsp/document.rb#112 + sig { abstract.returns(T::Boolean) } + def parse!; end + + # source://ruby-lsp/lib/ruby_lsp/document.rb#28 + sig { returns(ParseResultType) } + def parse_result; end + + # source://ruby-lsp/lib/ruby_lsp/document.rb#123 + sig { returns(T::Boolean) } + def past_expensive_limit?; end + + # source://ruby-lsp/lib/ruby_lsp/document.rb#94 + sig { params(edits: T::Array[T::Hash[::Symbol, T.untyped]], version: ::Integer).void } + def push_edits(edits, version:); end + + # source://ruby-lsp/lib/ruby_lsp/document.rb#43 + sig { returns(T.any(::LanguageServer::Protocol::Interface::SemanticTokens, ::Object)) } + def semantic_tokens; end + + # @return [Interface::SemanticTokens, Object] + # + # source://ruby-lsp/lib/ruby_lsp/document.rb#43 + def semantic_tokens=(_arg0); end + + # source://ruby-lsp/lib/ruby_lsp/document.rb#31 + sig { returns(::String) } + def source; end + + # @abstract + # + # source://ruby-lsp/lib/ruby_lsp/document.rb#115 + sig { abstract.returns(T::Boolean) } + def syntax_error?; end + + # source://ruby-lsp/lib/ruby_lsp/document.rb#37 + sig { returns(::URI::Generic) } + def uri; end + + # source://ruby-lsp/lib/ruby_lsp/document.rb#34 + sig { returns(::Integer) } + def version; end +end + +# source://ruby-lsp/lib/ruby_lsp/document.rb#23 +RubyLsp::Document::EMPTY_CACHE = T.let(T.unsafe(nil), Object) + +# source://ruby-lsp/lib/ruby_lsp/document.rb#6 +class RubyLsp::Document::LanguageId < ::T::Enum + enums do + ERB = new + RBS = new + Ruby = new + end +end + +# This maximum number of characters for providing expensive features, like semantic highlighting and diagnostics. +# This is the same number used by the TypeScript extension in VS Code +# +# source://ruby-lsp/lib/ruby_lsp/document.rb#22 +RubyLsp::Document::MAXIMUM_CHARACTERS_FOR_EXPENSIVE_FEATURES = T.let(T.unsafe(nil), Integer) + +# source://ruby-lsp/lib/ruby_lsp/document.rb#127 +class RubyLsp::Document::Scanner + # source://ruby-lsp/lib/ruby_lsp/document.rb#135 + sig { params(source: ::String, encoding: ::Encoding).void } + def initialize(source, encoding); end + + # Finds the character index inside the source string for a given line and column + # + # source://ruby-lsp/lib/ruby_lsp/document.rb#144 + sig { params(position: T::Hash[::Symbol, T.untyped]).returns(::Integer) } + def find_char_position(position); end + + # Subtract 1 for each character after 0xFFFF in the current line from the column position, so that we hit the + # right character in the UTF-8 representation + # + # source://ruby-lsp/lib/ruby_lsp/document.rb#166 + sig { params(current_position: ::Integer, requested_position: ::Integer).returns(::Integer) } + def utf_16_character_position_correction(current_position, requested_position); end +end + +# source://ruby-lsp/lib/ruby_lsp/document.rb#130 +RubyLsp::Document::Scanner::LINE_BREAK = T.let(T.unsafe(nil), Integer) + +# After character 0xFFFF, UTF-16 considers characters to have length 2 and we have to account for that +# +# source://ruby-lsp/lib/ruby_lsp/document.rb#132 +RubyLsp::Document::Scanner::SURROGATE_PAIR_START = T.let(T.unsafe(nil), Integer) + +# source://ruby-lsp/lib/ruby_lsp/erb_document.rb#5 +class RubyLsp::ERBDocument < ::RubyLsp::Document + extend T::Generic + + ParseResultType = type_member { { fixed: Prism::ParseResult } } + + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#23 + sig { params(source: ::String, version: ::Integer, uri: ::URI::Generic, encoding: ::Encoding).void } + def initialize(source:, version:, uri:, encoding: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#20 + sig { returns(T.any(::Prism::CodeUnitsCache, T.proc.params(arg0: ::Integer).returns(::Integer))) } + def code_units_cache; end + + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#12 + sig { returns(::String) } + def host_language_source; end + + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#75 + sig { params(char_position: ::Integer).returns(T.nilable(T::Boolean)) } + def inside_host_language?(char_position); end + + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#55 + sig { override.returns(::RubyLsp::Document::LanguageId) } + def language_id; end + + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#65 + sig do + params( + position: T::Hash[::Symbol, T.untyped], + node_types: T::Array[T.class_of(Prism::Node)] + ).returns(::RubyLsp::NodeContext) + end + def locate_node(position, node_types: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#35 + sig { override.returns(T::Boolean) } + def parse!; end + + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#50 + sig { override.returns(T::Boolean) } + def syntax_error?; end +end + +# source://ruby-lsp/lib/ruby_lsp/erb_document.rb#80 +class RubyLsp::ERBDocument::ERBScanner + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#87 + sig { params(source: ::String).void } + def initialize(source); end + + # @return [String] + # + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#84 + def host_language; end + + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#84 + sig { returns(::String) } + def ruby; end + + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#96 + sig { void } + def scan; end + + private + + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#172 + sig { returns(::String) } + def next_char; end + + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#161 + sig { params(char: ::String).void } + def push_char(char); end + + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#106 + sig { void } + def scan_char; end +end + +# source://ruby-lsp/lib/ruby_lsp/utils.rb#170 +class RubyLsp::Error + # source://ruby-lsp/lib/ruby_lsp/utils.rb#177 + sig { params(id: ::Integer, code: ::Integer, message: ::String, data: T.nilable(T::Hash[::Symbol, T.untyped])).void } + def initialize(id:, code:, message:, data: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_lsp/utils.rb#174 + sig { returns(::String) } + def message; end + + # source://ruby-lsp/lib/ruby_lsp/utils.rb#185 + sig { returns(T::Hash[::Symbol, T.untyped]) } + def to_hash; end +end + +# source://ruby-lsp/lib/ruby_lsp/utils.rb#20 +RubyLsp::GEMFILE_NAME = T.let(T.unsafe(nil), String) + +# source://ruby-lsp/lib/ruby_lsp/utils.rb#28 +RubyLsp::GUESSED_TYPES_URL = T.let(T.unsafe(nil), String) + +# source://ruby-lsp/lib/ruby_lsp/global_state.rb#5 +class RubyLsp::GlobalState + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#33 + sig { void } + def initialize; end + + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#69 + sig { returns(T.nilable(::RubyLsp::Requests::Support::Formatter)) } + def active_formatter; end + + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#74 + sig { returns(T::Array[::RubyLsp::Requests::Support::Formatter]) } + def active_linters; end + + # Applies the options provided by the editor and returns an array of notifications to send back to the client + # + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#80 + sig { params(options: T::Hash[::Symbol, T.untyped]).returns(T::Array[::RubyLsp::Notification]) } + def apply_options(options); end + + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#30 + sig { returns(::RubyLsp::ClientCapabilities) } + def client_capabilities; end + + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#148 + sig { params(flag: ::Symbol).returns(T.nilable(T::Boolean)) } + def enabled_feature?(flag); end + + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#21 + sig { returns(::Encoding) } + def encoding; end + + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#158 + sig { returns(::String) } + def encoding_name; end + + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#12 + sig { returns(::String) } + def formatter; end + + # @return [String] + # + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#12 + def formatter=(_arg0); end + + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#15 + sig { returns(T::Boolean) } + def has_type_checker; end + + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#18 + sig { returns(::RubyIndexer::Index) } + def index; end + + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#64 + sig { params(identifier: ::String, instance: ::RubyLsp::Requests::Support::Formatter).void } + def register_formatter(identifier, instance); end + + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#59 + sig { params(addon_name: ::String).returns(T.nilable(T::Hash[::Symbol, T.untyped])) } + def settings_for_addon(addon_name); end + + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#170 + sig { returns(T::Boolean) } + def supports_watching_files; end + + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#9 + sig { returns(::String) } + def test_library; end + + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#24 + sig { returns(T::Boolean) } + def top_level_bundle; end + + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#27 + sig { returns(::RubyLsp::TypeInferrer) } + def type_inferrer; end + + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#153 + sig { returns(::String) } + def workspace_path; end + + private + + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#233 + sig { returns(T::Boolean) } + def bin_rails_present; end + + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#177 + sig { params(direct_dependencies: T::Array[::String], all_dependencies: T::Array[::String]).returns(::String) } + def detect_formatter(direct_dependencies, all_dependencies); end + + # Try to detect if there are linters in the project's dependencies. For auto-detection, we always only consider a + # single linter. To have multiple linters running, the user must configure them manually + # + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#193 + sig { params(dependencies: T::Array[::String], all_dependencies: T::Array[::String]).returns(T::Array[::String]) } + def detect_linters(dependencies, all_dependencies); end + + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#204 + sig { params(dependencies: T::Array[::String]).returns(::String) } + def detect_test_library(dependencies); end + + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#224 + sig { params(dependencies: T::Array[::String]).returns(T::Boolean) } + def detect_typechecker(dependencies); end + + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#238 + sig { returns(T::Boolean) } + def dot_rubocop_yml_present; end + + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#260 + sig { returns(T::Array[::String]) } + def gather_direct_and_indirect_dependencies; end + + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#243 + sig { returns(T::Array[::String]) } + def gather_direct_dependencies; end + + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#253 + sig { returns(T::Array[::String]) } + def gemspec_dependencies; end +end + +# source://ruby-lsp/lib/ruby_lsp/utils.rb#6 +RubyLsp::Interface = LanguageServer::Protocol::Interface + +# A map of keyword => short documentation to be displayed on hover or completion +# +# source://ruby-lsp/lib/ruby_lsp/static_docs.rb#9 +RubyLsp::KEYWORD_DOCS = T.let(T.unsafe(nil), Hash) + +# source://ruby-lsp/lib/ruby_lsp/listeners/code_lens.rb#7 +module RubyLsp::Listeners; end + +# source://ruby-lsp/lib/ruby_lsp/listeners/code_lens.rb#8 +class RubyLsp::Listeners::CodeLens + include ::RubyLsp::Requests::Support::Common + + # source://ruby-lsp/lib/ruby_lsp/listeners/code_lens.rb#35 + sig do + params( + response_builder: RubyLsp::ResponseBuilders::CollectionResponseBuilder[::LanguageServer::Protocol::Interface::CodeLens], + global_state: ::RubyLsp::GlobalState, + uri: ::URI::Generic, + dispatcher: ::Prism::Dispatcher + ).void + end + def initialize(response_builder, global_state, uri, dispatcher); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/code_lens.rb#137 + sig { params(node: ::Prism::CallNode).void } + def on_call_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/code_lens.rb#167 + sig { params(node: ::Prism::CallNode).void } + def on_call_node_leave(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/code_lens.rb#63 + sig { params(node: ::Prism::ClassNode).void } + def on_class_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/code_lens.rb#83 + sig { params(node: ::Prism::ClassNode).void } + def on_class_node_leave(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/code_lens.rb#95 + sig { params(node: ::Prism::DefNode).void } + def on_def_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/code_lens.rb#118 + sig { params(node: ::Prism::DefNode).void } + def on_def_node_leave(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/code_lens.rb#123 + sig { params(node: ::Prism::ModuleNode).void } + def on_module_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/code_lens.rb#132 + sig { params(node: ::Prism::ModuleNode).void } + def on_module_node_leave(node); end + + private + + # source://ruby-lsp/lib/ruby_lsp/listeners/code_lens.rb#274 + sig { params(node: ::Prism::CallNode, kind: ::Symbol).void } + def add_spec_code_lens(node, kind:); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/code_lens.rb#179 + sig { params(node: ::Prism::Node, name: ::String, command: ::String, kind: ::Symbol, id: ::String).void } + def add_test_code_lens(node, name:, command:, kind:, id: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/code_lens.rb#312 + sig { params(group_stack: T::Array[::String], method_name: T.nilable(::String)).returns(::String) } + def generate_fully_qualified_id(group_stack:, method_name: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/code_lens.rb#231 + sig do + params( + group_stack: T::Array[::String], + spec_name: T.nilable(::String), + method_name: T.nilable(::String) + ).returns(::String) + end + def generate_test_command(group_stack: T.unsafe(nil), spec_name: T.unsafe(nil), method_name: T.unsafe(nil)); end +end + +# source://ruby-lsp/lib/ruby_lsp/listeners/code_lens.rb#21 +RubyLsp::Listeners::CodeLens::ACCESS_MODIFIERS = T.let(T.unsafe(nil), Array) + +# source://ruby-lsp/lib/ruby_lsp/listeners/code_lens.rb#12 +RubyLsp::Listeners::CodeLens::BASE_COMMAND = T.let(T.unsafe(nil), String) + +# source://ruby-lsp/lib/ruby_lsp/listeners/code_lens.rb#23 +RubyLsp::Listeners::CodeLens::DESCRIBE_KEYWORD = T.let(T.unsafe(nil), Symbol) + +# source://ruby-lsp/lib/ruby_lsp/listeners/code_lens.rb#25 +RubyLsp::Listeners::CodeLens::DYNAMIC_REFERENCE_MARKER = T.let(T.unsafe(nil), String) + +# source://ruby-lsp/lib/ruby_lsp/listeners/code_lens.rb#24 +RubyLsp::Listeners::CodeLens::IT_KEYWORD = T.let(T.unsafe(nil), Symbol) + +# source://ruby-lsp/lib/ruby_lsp/listeners/code_lens.rb#22 +RubyLsp::Listeners::CodeLens::SUPPORTED_TEST_LIBRARIES = T.let(T.unsafe(nil), Array) + +# source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#6 +class RubyLsp::Listeners::Completion + include ::RubyLsp::Requests::Support::Common + + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#65 + sig do + params( + response_builder: RubyLsp::ResponseBuilders::CollectionResponseBuilder[::LanguageServer::Protocol::Interface::CompletionItem], + global_state: ::RubyLsp::GlobalState, + node_context: ::RubyLsp::NodeContext, + sorbet_level: ::RubyLsp::RubyDocument::SorbetLevel, + dispatcher: ::Prism::Dispatcher, + uri: ::URI::Generic, + trigger_character: T.nilable(::String) + ).void + end + def initialize(response_builder, global_state, node_context, sorbet_level, dispatcher, uri, trigger_character); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#146 + sig { params(node: ::Prism::CallNode).void } + def on_call_node_enter(node); end + + # Handle completion on namespaced constant references (e.g. `Foo::Bar`) + # + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#128 + sig { params(node: ::Prism::ConstantPathNode).void } + def on_constant_path_node_enter(node); end + + # Handle completion on regular constant references (e.g. `Bar`) + # + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#105 + sig { params(node: ::Prism::ConstantReadNode).void } + def on_constant_read_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#190 + sig { params(node: ::Prism::GlobalVariableAndWriteNode).void } + def on_global_variable_and_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#195 + sig { params(node: ::Prism::GlobalVariableOperatorWriteNode).void } + def on_global_variable_operator_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#200 + sig { params(node: ::Prism::GlobalVariableOrWriteNode).void } + def on_global_variable_or_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#205 + sig { params(node: ::Prism::GlobalVariableReadNode).void } + def on_global_variable_read_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#210 + sig { params(node: ::Prism::GlobalVariableTargetNode).void } + def on_global_variable_target_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#215 + sig { params(node: ::Prism::GlobalVariableWriteNode).void } + def on_global_variable_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#230 + sig { params(node: ::Prism::InstanceVariableAndWriteNode).void } + def on_instance_variable_and_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#235 + sig { params(node: ::Prism::InstanceVariableOperatorWriteNode).void } + def on_instance_variable_operator_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#240 + sig { params(node: ::Prism::InstanceVariableOrWriteNode).void } + def on_instance_variable_or_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#220 + sig { params(node: ::Prism::InstanceVariableReadNode).void } + def on_instance_variable_read_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#245 + sig { params(node: ::Prism::InstanceVariableTargetNode).void } + def on_instance_variable_target_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#225 + sig { params(node: ::Prism::InstanceVariableWriteNode).void } + def on_instance_variable_write_node_enter(node); end + + private + + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#492 + sig { params(node: ::Prism::CallNode, name: ::String).void } + def add_keyword_completions(node, name); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#472 + sig { params(node: ::Prism::CallNode, name: ::String).void } + def add_local_completions(node, name); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#510 + sig do + params( + label: ::String, + node: ::Prism::StringNode + ).returns(::LanguageServer::Protocol::Interface::CompletionItem) + end + def build_completion(label, node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#533 + sig do + params( + real_name: ::String, + incomplete_name: ::String, + range: ::LanguageServer::Protocol::Interface::Range, + entries: T::Array[::RubyIndexer::Entry], + top_level: T::Boolean + ).returns(::LanguageServer::Protocol::Interface::CompletionItem) + end + def build_entry_completion(real_name, incomplete_name, range, entries, top_level); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#408 + sig { params(node: ::Prism::CallNode, name: ::String).void } + def complete_methods(node, name); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#363 + sig { params(node: ::Prism::CallNode).void } + def complete_require(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#379 + sig { params(node: ::Prism::CallNode).void } + def complete_require_relative(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#252 + sig { params(name: ::String, range: ::LanguageServer::Protocol::Interface::Range).void } + def constant_path_completion(name, range); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#307 + sig { params(name: ::String, location: ::Prism::Location).void } + def handle_global_variable_completion(name, location); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#330 + sig { params(name: ::String, location: ::Prism::Location).void } + def handle_instance_variable_completion(name, location); end + + # Check if there are any conflicting names for `entry_name`, which would require us to use a top level reference. + # For example: + # + # ```ruby + # class Bar; end + # + # module Foo + # class Bar; end + # + # # in this case, the completion for `Bar` conflicts with `Foo::Bar`, so we can't suggest `Bar` as the + # # completion, but instead need to suggest `::Bar` + # B + # end + # ``` + # + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#622 + sig { params(entry_name: ::String).returns(T::Boolean) } + def top_level?(entry_name); end +end + +# source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#10 +RubyLsp::Listeners::Completion::KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#6 +class RubyLsp::Listeners::Definition + include ::RubyLsp::Requests::Support::Common + + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#26 + sig do + params( + response_builder: RubyLsp::ResponseBuilders::CollectionResponseBuilder[T.any(::LanguageServer::Protocol::Interface::Location, ::LanguageServer::Protocol::Interface::LocationLink)], + global_state: ::RubyLsp::GlobalState, + language_id: ::RubyLsp::Document::LanguageId, + uri: ::URI::Generic, + node_context: ::RubyLsp::NodeContext, + dispatcher: ::Prism::Dispatcher, + sorbet_level: ::RubyLsp::RubyDocument::SorbetLevel + ).void + end + def initialize(response_builder, global_state, language_id, uri, node_context, dispatcher, sorbet_level); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#103 + sig { params(node: ::Prism::BlockArgumentNode).void } + def on_block_argument_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#62 + sig { params(node: ::Prism::CallNode).void } + def on_call_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#114 + sig { params(node: ::Prism::ConstantPathNode).void } + def on_constant_path_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#122 + sig { params(node: ::Prism::ConstantReadNode).void } + def on_constant_read_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#195 + sig { params(node: ::Prism::ForwardingSuperNode).void } + def on_forwarding_super_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#130 + sig { params(node: ::Prism::GlobalVariableAndWriteNode).void } + def on_global_variable_and_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#135 + sig { params(node: ::Prism::GlobalVariableOperatorWriteNode).void } + def on_global_variable_operator_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#140 + sig { params(node: ::Prism::GlobalVariableOrWriteNode).void } + def on_global_variable_or_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#145 + sig { params(node: ::Prism::GlobalVariableReadNode).void } + def on_global_variable_read_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#150 + sig { params(node: ::Prism::GlobalVariableTargetNode).void } + def on_global_variable_target_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#155 + sig { params(node: ::Prism::GlobalVariableWriteNode).void } + def on_global_variable_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#170 + sig { params(node: ::Prism::InstanceVariableAndWriteNode).void } + def on_instance_variable_and_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#175 + sig { params(node: ::Prism::InstanceVariableOperatorWriteNode).void } + def on_instance_variable_operator_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#180 + sig { params(node: ::Prism::InstanceVariableOrWriteNode).void } + def on_instance_variable_or_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#160 + sig { params(node: ::Prism::InstanceVariableReadNode).void } + def on_instance_variable_read_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#185 + sig { params(node: ::Prism::InstanceVariableTargetNode).void } + def on_instance_variable_target_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#165 + sig { params(node: ::Prism::InstanceVariableWriteNode).void } + def on_instance_variable_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#81 + sig { params(node: ::Prism::StringNode).void } + def on_string_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#190 + sig { params(node: ::Prism::SuperNode).void } + def on_super_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#92 + sig { params(node: ::Prism::SymbolNode).void } + def on_symbol_node_enter(node); end + + private + + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#336 + sig { params(value: ::String).void } + def find_in_index(value); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#325 + sig { params(node: ::Prism::CallNode).void } + def handle_autoload_definition(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#217 + sig { params(name: ::String).void } + def handle_global_variable_definition(name); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#236 + sig { params(name: ::String).void } + def handle_instance_variable_definition(name); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#263 + sig do + params( + message: ::String, + receiver_type: T.nilable(::RubyLsp::TypeInferrer::Type), + inherited_only: T::Boolean + ).void + end + def handle_method_definition(message, receiver_type, inherited_only: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#290 + sig { params(node: ::Prism::StringNode, message: ::Symbol).void } + def handle_require_definition(node, message); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#202 + sig { void } + def handle_super_node_definition; end +end + +# source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#10 +RubyLsp::Listeners::Definition::MAX_NUMBER_OF_DEFINITION_CANDIDATES_WITHOUT_RECEIVER = T.let(T.unsafe(nil), Integer) + +# source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#6 +class RubyLsp::Listeners::DocumentHighlight + include ::RubyLsp::Requests::Support::Common + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#98 + sig do + params( + response_builder: RubyLsp::ResponseBuilders::CollectionResponseBuilder[::LanguageServer::Protocol::Interface::DocumentHighlight], + target: T.nilable(::Prism::Node), + parent: T.nilable(::Prism::Node), + dispatcher: ::Prism::Dispatcher, + position: T::Hash[::Symbol, T.untyped] + ).void + end + def initialize(response_builder, target, parent, dispatcher, position); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#254 + sig { params(node: ::Prism::BlockParameterNode).void } + def on_block_parameter_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#192 + sig { params(node: ::Prism::CallNode).void } + def on_call_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#540 + sig { params(node: ::Prism::CaseNode).void } + def on_case_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#268 + sig { params(node: ::Prism::ClassNode).void } + def on_class_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#442 + sig { params(node: ::Prism::ClassVariableAndWriteNode).void } + def on_class_variable_and_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#435 + sig { params(node: ::Prism::ClassVariableOperatorWriteNode).void } + def on_class_variable_operator_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#428 + sig { params(node: ::Prism::ClassVariableOrWriteNode).void } + def on_class_variable_or_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#314 + sig { params(node: ::Prism::ClassVariableReadNode).void } + def on_class_variable_read_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#240 + sig { params(node: ::Prism::ClassVariableTargetNode).void } + def on_class_variable_target_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#421 + sig { params(node: ::Prism::ClassVariableWriteNode).void } + def on_class_variable_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#498 + sig { params(node: ::Prism::ConstantAndWriteNode).void } + def on_constant_and_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#463 + sig { params(node: ::Prism::ConstantOperatorWriteNode).void } + def on_constant_operator_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#456 + sig { params(node: ::Prism::ConstantOrWriteNode).void } + def on_constant_or_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#342 + sig { params(node: ::Prism::ConstantPathAndWriteNode).void } + def on_constant_path_and_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#293 + sig { params(node: ::Prism::ConstantPathNode).void } + def on_constant_path_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#349 + sig { params(node: ::Prism::ConstantPathOperatorWriteNode).void } + def on_constant_path_operator_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#335 + sig { params(node: ::Prism::ConstantPathOrWriteNode).void } + def on_constant_path_or_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#226 + sig { params(node: ::Prism::ConstantPathTargetNode).void } + def on_constant_path_target_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#328 + sig { params(node: ::Prism::ConstantPathWriteNode).void } + def on_constant_path_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#300 + sig { params(node: ::Prism::ConstantReadNode).void } + def on_constant_read_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#233 + sig { params(node: ::Prism::ConstantTargetNode).void } + def on_constant_target_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#449 + sig { params(node: ::Prism::ConstantWriteNode).void } + def on_constant_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#203 + sig { params(node: ::Prism::DefNode).void } + def on_def_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#561 + sig { params(node: ::Prism::ForNode).void } + def on_for_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#519 + sig { params(node: ::Prism::GlobalVariableAndWriteNode).void } + def on_global_variable_and_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#526 + sig { params(node: ::Prism::GlobalVariableOperatorWriteNode).void } + def on_global_variable_operator_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#512 + sig { params(node: ::Prism::GlobalVariableOrWriteNode).void } + def on_global_variable_or_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#321 + sig { params(node: ::Prism::GlobalVariableReadNode).void } + def on_global_variable_read_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#212 + sig { params(node: ::Prism::GlobalVariableTargetNode).void } + def on_global_variable_target_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#505 + sig { params(node: ::Prism::GlobalVariableWriteNode).void } + def on_global_variable_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#568 + sig { params(node: ::Prism::IfNode).void } + def on_if_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#484 + sig { params(node: ::Prism::InstanceVariableAndWriteNode).void } + def on_instance_variable_and_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#491 + sig { params(node: ::Prism::InstanceVariableOperatorWriteNode).void } + def on_instance_variable_operator_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#477 + sig { params(node: ::Prism::InstanceVariableOrWriteNode).void } + def on_instance_variable_or_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#307 + sig { params(node: ::Prism::InstanceVariableReadNode).void } + def on_instance_variable_read_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#219 + sig { params(node: ::Prism::InstanceVariableTargetNode).void } + def on_instance_variable_target_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#470 + sig { params(node: ::Prism::InstanceVariableWriteNode).void } + def on_instance_variable_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#392 + sig { params(node: ::Prism::KeywordRestParameterNode).void } + def on_keyword_rest_parameter_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#400 + sig { params(node: ::Prism::LocalVariableAndWriteNode).void } + def on_local_variable_and_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#407 + sig { params(node: ::Prism::LocalVariableOperatorWriteNode).void } + def on_local_variable_operator_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#414 + sig { params(node: ::Prism::LocalVariableOrWriteNode).void } + def on_local_variable_or_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#286 + sig { params(node: ::Prism::LocalVariableReadNode).void } + def on_local_variable_read_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#247 + sig { params(node: ::Prism::LocalVariableTargetNode).void } + def on_local_variable_target_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#356 + sig { params(node: ::Prism::LocalVariableWriteNode).void } + def on_local_variable_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#277 + sig { params(node: ::Prism::ModuleNode).void } + def on_module_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#370 + sig { params(node: ::Prism::OptionalKeywordParameterNode).void } + def on_optional_keyword_parameter_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#385 + sig { params(node: ::Prism::OptionalParameterNode).void } + def on_optional_parameter_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#363 + sig { params(node: ::Prism::RequiredKeywordParameterNode).void } + def on_required_keyword_parameter_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#261 + sig { params(node: ::Prism::RequiredParameterNode).void } + def on_required_parameter_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#377 + sig { params(node: ::Prism::RestParameterNode).void } + def on_rest_parameter_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#533 + sig { params(node: ::Prism::SingletonClassNode).void } + def on_singleton_class_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#575 + sig { params(node: ::Prism::UnlessNode).void } + def on_unless_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#554 + sig { params(node: ::Prism::UntilNode).void } + def on_until_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#547 + sig { params(node: ::Prism::WhileNode).void } + def on_while_node_enter(node); end + + private + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#589 + sig { params(kind: ::Integer, location: ::Prism::Location).void } + def add_highlight(kind, location); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#622 + sig { params(keyword_loc: T.nilable(::Prism::Location), end_loc: T.nilable(::Prism::Location)).void } + def add_matching_end_highlights(keyword_loc, end_loc); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#631 + sig { params(location: ::Prism::Location).returns(T::Boolean) } + def covers_target_position?(location); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#584 + sig { params(node: ::Prism::Node, classes: T::Array[T.class_of(Prism::Node)]).returns(T.nilable(T::Boolean)) } + def matches?(node, classes); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#594 + sig { params(node: T.nilable(::Prism::Node)).returns(T.nilable(::String)) } + def node_value(node); end +end + +# source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#58 +RubyLsp::Listeners::DocumentHighlight::CLASS_VARIABLE_NODES = T.let(T.unsafe(nil), Array) + +# source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#34 +RubyLsp::Listeners::DocumentHighlight::CONSTANT_NODES = T.let(T.unsafe(nil), Array) + +# source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#46 +RubyLsp::Listeners::DocumentHighlight::CONSTANT_PATH_NODES = T.let(T.unsafe(nil), Array) + +# source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#10 +RubyLsp::Listeners::DocumentHighlight::GLOBAL_VARIABLE_NODES = T.let(T.unsafe(nil), Array) + +# source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#22 +RubyLsp::Listeners::DocumentHighlight::INSTANCE_VARIABLE_NODES = T.let(T.unsafe(nil), Array) + +# source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#70 +RubyLsp::Listeners::DocumentHighlight::LOCAL_NODES = T.let(T.unsafe(nil), Array) + +# source://ruby-lsp/lib/ruby_lsp/listeners/document_link.rb#8 +class RubyLsp::Listeners::DocumentLink + include ::RubyLsp::Requests::Support::Common + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_link.rb#68 + sig do + params( + response_builder: RubyLsp::ResponseBuilders::CollectionResponseBuilder[::LanguageServer::Protocol::Interface::DocumentLink], + uri: ::URI::Generic, + comments: T::Array[::Prism::Comment], + dispatcher: ::Prism::Dispatcher + ).void + end + def initialize(response_builder, uri, comments, dispatcher); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_link.rb#98 + sig { params(node: ::Prism::ClassNode).void } + def on_class_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_link.rb#113 + sig { params(node: ::Prism::ConstantPathWriteNode).void } + def on_constant_path_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_link.rb#108 + sig { params(node: ::Prism::ConstantWriteNode).void } + def on_constant_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_link.rb#93 + sig { params(node: ::Prism::DefNode).void } + def on_def_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_link.rb#103 + sig { params(node: ::Prism::ModuleNode).void } + def on_module_node_enter(node); end + + private + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_link.rb#120 + sig { params(node: ::Prism::Node).void } + def extract_document_link(node); end + + # Try to figure out the gem version for a source:// link. The order of precedence is: + # 1. The version in the URI + # 2. The version in the RBI file name + # 3. The version from the gemspec + # + # source://ruby-lsp/lib/ruby_lsp/listeners/document_link.rb#146 + sig { params(uri: ::URI::Source).returns(T.nilable(::String)) } + def resolve_version(uri); end + + class << self + # source://ruby-lsp/lib/ruby_lsp/listeners/document_link.rb#23 + sig { returns(T::Hash[::String, T::Hash[::String, T::Hash[::String, ::String]]]) } + def gem_paths; end + end +end + +# source://ruby-lsp/lib/ruby_lsp/listeners/document_link.rb#12 +RubyLsp::Listeners::DocumentLink::GEM_TO_VERSION_MAP = T.let(T.unsafe(nil), Hash) + +# source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#6 +class RubyLsp::Listeners::DocumentSymbol + include ::RubyLsp::Requests::Support::Common + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#19 + sig do + params( + response_builder: RubyLsp::ResponseBuilders::DocumentSymbol, + uri: ::URI::Generic, + dispatcher: ::Prism::Dispatcher + ).void + end + def initialize(response_builder, uri, dispatcher); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#306 + sig { params(node: ::Prism::AliasMethodNode).void } + def on_alias_method_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#87 + sig { params(node: ::Prism::CallNode).void } + def on_call_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#101 + sig { params(node: ::Prism::CallNode).void } + def on_call_node_leave(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#55 + sig { params(node: ::Prism::ClassNode).void } + def on_class_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#65 + sig { params(node: ::Prism::ClassNode).void } + def on_class_node_leave(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#256 + sig { params(node: ::Prism::ClassVariableWriteNode).void } + def on_class_variable_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#170 + sig { params(node: ::Prism::ConstantAndWriteNode).void } + def on_constant_and_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#180 + sig { params(node: ::Prism::ConstantOperatorWriteNode).void } + def on_constant_operator_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#160 + sig { params(node: ::Prism::ConstantOrWriteNode).void } + def on_constant_or_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#130 + sig { params(node: ::Prism::ConstantPathAndWriteNode).void } + def on_constant_path_and_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#150 + sig { params(node: ::Prism::ConstantPathOperatorWriteNode).void } + def on_constant_path_operator_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#140 + sig { params(node: ::Prism::ConstantPathOrWriteNode).void } + def on_constant_path_or_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#200 + sig { params(node: ::Prism::ConstantPathTargetNode).void } + def on_constant_path_target_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#110 + sig { params(node: ::Prism::ConstantPathWriteNode).void } + def on_constant_path_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#190 + sig { params(node: ::Prism::ConstantTargetNode).void } + def on_constant_target_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#120 + sig { params(node: ::Prism::ConstantWriteNode).void } + def on_constant_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#225 + sig { params(node: ::Prism::DefNode).void } + def on_def_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#210 + sig { params(node: ::Prism::DefNode).void } + def on_def_node_leave(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#296 + sig { params(node: ::Prism::InstanceVariableAndWriteNode).void } + def on_instance_variable_and_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#276 + sig { params(node: ::Prism::InstanceVariableOperatorWriteNode).void } + def on_instance_variable_operator_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#286 + sig { params(node: ::Prism::InstanceVariableOrWriteNode).void } + def on_instance_variable_or_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#266 + sig { params(node: ::Prism::InstanceVariableWriteNode).void } + def on_instance_variable_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#215 + sig { params(node: ::Prism::ModuleNode).void } + def on_module_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#251 + sig { params(node: ::Prism::ModuleNode).void } + def on_module_node_leave(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#70 + sig { params(node: ::Prism::SingletonClassNode).void } + def on_singleton_class_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#82 + sig { params(node: ::Prism::SingletonClassNode).void } + def on_singleton_class_node_leave(node); end + + private + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#331 + sig do + params( + name: ::String, + kind: ::Integer, + range_location: ::Prism::Location, + selection_range_location: ::Prism::Location + ).returns(::LanguageServer::Protocol::Interface::DocumentSymbol) + end + def create_document_symbol(name:, kind:, range_location:, selection_range_location:); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#380 + sig { params(node: ::Prism::CallNode).void } + def handle_alias_method(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#347 + sig { params(node: ::Prism::CallNode).void } + def handle_attr_accessor(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#413 + sig { params(node: ::Prism::CallNode).void } + def handle_rake_namespace(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#439 + sig { params(node: ::Prism::CallNode).void } + def handle_rake_task(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#474 + sig { returns(T::Boolean) } + def rake?; end +end + +# source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#10 +RubyLsp::Listeners::DocumentSymbol::ATTR_ACCESSORS = T.let(T.unsafe(nil), Array) + +# source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#6 +class RubyLsp::Listeners::FoldingRanges + include ::RubyLsp::Requests::Support::Common + + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#17 + sig do + params( + response_builder: RubyLsp::ResponseBuilders::CollectionResponseBuilder[::LanguageServer::Protocol::Interface::FoldingRange], + comments: T::Array[::Prism::Comment], + dispatcher: ::Prism::Dispatcher + ).void + end + def initialize(response_builder, comments, dispatcher); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#51 + sig { void } + def finalize_response!; end + + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#85 + sig { params(node: ::Prism::ArrayNode).void } + def on_array_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#155 + sig { params(node: ::Prism::BeginNode).void } + def on_begin_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#90 + sig { params(node: ::Prism::BlockNode).void } + def on_block_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#175 + sig { params(node: ::Prism::CallNode).void } + def on_call_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#100 + sig { params(node: ::Prism::CaseMatchNode).void } + def on_case_match_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#95 + sig { params(node: ::Prism::CaseNode).void } + def on_case_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#105 + sig { params(node: ::Prism::ClassNode).void } + def on_class_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#160 + sig { params(node: ::Prism::DefNode).void } + def on_def_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#145 + sig { params(node: ::Prism::ElseNode).void } + def on_else_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#150 + sig { params(node: ::Prism::EnsureNode).void } + def on_ensure_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#115 + sig { params(node: ::Prism::ForNode).void } + def on_for_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#120 + sig { params(node: ::Prism::HashNode).void } + def on_hash_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#57 + sig { params(node: ::Prism::IfNode).void } + def on_if_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#62 + sig { params(node: ::Prism::InNode).void } + def on_in_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#77 + sig { params(node: ::Prism::InterpolatedStringNode).void } + def on_interpolated_string_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#188 + sig { params(node: ::Prism::LambdaNode).void } + def on_lambda_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#110 + sig { params(node: ::Prism::ModuleNode).void } + def on_module_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#67 + sig { params(node: ::Prism::RescueNode).void } + def on_rescue_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#125 + sig { params(node: ::Prism::SingletonClassNode).void } + def on_singleton_class_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#130 + sig { params(node: ::Prism::UnlessNode).void } + def on_unless_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#135 + sig { params(node: ::Prism::UntilNode).void } + def on_until_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#72 + sig { params(node: ::Prism::WhenNode).void } + def on_when_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#140 + sig { params(node: ::Prism::WhileNode).void } + def on_while_node_enter(node); end + + private + + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#255 + sig { params(start_line: ::Integer, end_line: ::Integer).void } + def add_lines_range(start_line, end_line); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#249 + sig { params(node: ::Prism::Node).void } + def add_simple_range(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#238 + sig { params(node: T.any(::Prism::IfNode, ::Prism::InNode, ::Prism::RescueNode, ::Prism::WhenNode)).void } + def add_statements_range(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#211 + sig { void } + def emit_requires_range; end + + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#195 + sig { void } + def push_comment_ranges; end + + # source://ruby-lsp/lib/ruby_lsp/listeners/folding_ranges.rb#224 + sig { params(node: ::Prism::CallNode).returns(T::Boolean) } + def require?(node); end +end + +# source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#6 +class RubyLsp::Listeners::Hover + include ::RubyLsp::Requests::Support::Common + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#56 + sig do + params( + response_builder: RubyLsp::ResponseBuilders::Hover, + global_state: ::RubyLsp::GlobalState, + uri: ::URI::Generic, + node_context: ::RubyLsp::NodeContext, + dispatcher: ::Prism::Dispatcher, + sorbet_level: ::RubyLsp::RubyDocument::SorbetLevel + ).void + end + def initialize(response_builder, global_state, uri, node_context, dispatcher, sorbet_level); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#129 + sig { params(node: ::Prism::CallNode).void } + def on_call_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#119 + sig { params(node: ::Prism::ConstantPathNode).void } + def on_constant_path_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#102 + sig { params(node: ::Prism::ConstantReadNode).void } + def on_constant_read_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#112 + sig { params(node: ::Prism::ConstantWriteNode).void } + def on_constant_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#209 + sig { params(node: ::Prism::ForwardingSuperNode).void } + def on_forwarding_super_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#144 + sig { params(node: ::Prism::GlobalVariableAndWriteNode).void } + def on_global_variable_and_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#149 + sig { params(node: ::Prism::GlobalVariableOperatorWriteNode).void } + def on_global_variable_operator_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#154 + sig { params(node: ::Prism::GlobalVariableOrWriteNode).void } + def on_global_variable_or_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#159 + sig { params(node: ::Prism::GlobalVariableReadNode).void } + def on_global_variable_read_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#164 + sig { params(node: ::Prism::GlobalVariableTargetNode).void } + def on_global_variable_target_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#169 + sig { params(node: ::Prism::GlobalVariableWriteNode).void } + def on_global_variable_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#184 + sig { params(node: ::Prism::InstanceVariableAndWriteNode).void } + def on_instance_variable_and_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#189 + sig { params(node: ::Prism::InstanceVariableOperatorWriteNode).void } + def on_instance_variable_operator_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#194 + sig { params(node: ::Prism::InstanceVariableOrWriteNode).void } + def on_instance_variable_or_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#174 + sig { params(node: ::Prism::InstanceVariableReadNode).void } + def on_instance_variable_read_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#199 + sig { params(node: ::Prism::InstanceVariableTargetNode).void } + def on_instance_variable_target_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#179 + sig { params(node: ::Prism::InstanceVariableWriteNode).void } + def on_instance_variable_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#97 + sig { params(node: ::Prism::InterpolatedStringNode).void } + def on_interpolated_string_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#92 + sig { params(node: ::Prism::StringNode).void } + def on_string_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#204 + sig { params(node: ::Prism::SuperNode).void } + def on_super_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#214 + sig { params(node: ::Prism::YieldNode).void } + def on_yield_node_enter(node); end + + private + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#336 + sig { params(node: ::Prism::CallNode).void } + def generate_gem_hover(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#221 + sig { params(node: T.any(::Prism::InterpolatedStringNode, ::Prism::StringNode)).void } + def generate_heredoc_hover(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#321 + sig { params(name: ::String, location: ::Prism::Location).void } + def generate_hover(name, location); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#311 + sig { params(name: ::String).void } + def handle_global_variable_hover(name); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#292 + sig { params(name: ::String).void } + def handle_instance_variable_hover(name); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#246 + sig { params(keyword: ::String).void } + def handle_keyword_documentation(keyword); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#269 + sig { params(message: ::String, inherited_only: T::Boolean).void } + def handle_method_hover(message, inherited_only: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#258 + sig { void } + def handle_super_node_hover; end +end + +# source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#38 +RubyLsp::Listeners::Hover::ALLOWED_REMOTE_PROVIDERS = T.let(T.unsafe(nil), Array) + +# source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#10 +RubyLsp::Listeners::Hover::ALLOWED_TARGETS = T.let(T.unsafe(nil), Array) + +# source://ruby-lsp/lib/ruby_lsp/listeners/inlay_hints.rb#6 +class RubyLsp::Listeners::InlayHints + include ::RubyLsp::Requests::Support::Common + + # source://ruby-lsp/lib/ruby_lsp/listeners/inlay_hints.rb#19 + sig do + params( + response_builder: RubyLsp::ResponseBuilders::CollectionResponseBuilder[::LanguageServer::Protocol::Interface::InlayHint], + hints_configuration: ::RubyLsp::RequestConfig, + dispatcher: ::Prism::Dispatcher + ).void + end + def initialize(response_builder, hints_configuration, dispatcher); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/inlay_hints.rb#42 + sig { params(node: ::Prism::ImplicitNode).void } + def on_implicit_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/inlay_hints.rb#27 + sig { params(node: ::Prism::RescueNode).void } + def on_rescue_node_enter(node); end +end + +# source://ruby-lsp/lib/ruby_lsp/listeners/inlay_hints.rb#10 +RubyLsp::Listeners::InlayHints::RESCUE_STRING_LENGTH = T.let(T.unsafe(nil), Integer) + +# source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#6 +class RubyLsp::Listeners::SemanticHighlighting + include ::RubyLsp::Requests::Support::Common + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#27 + sig do + params( + dispatcher: ::Prism::Dispatcher, + response_builder: RubyLsp::ResponseBuilders::SemanticHighlighting + ).void + end + def initialize(dispatcher, response_builder); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#124 + sig { params(node: ::Prism::BlockLocalVariableNode).void } + def on_block_local_variable_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#114 + sig { params(node: ::Prism::BlockNode).void } + def on_block_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#119 + sig { params(node: ::Prism::BlockNode).void } + def on_block_node_leave(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#129 + sig { params(node: ::Prism::BlockParameterNode).void } + def on_block_parameter_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#66 + sig { params(node: ::Prism::CallNode).void } + def on_call_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#222 + sig { params(node: ::Prism::ClassNode).void } + def on_class_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#104 + sig { params(node: ::Prism::DefNode).void } + def on_def_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#109 + sig { params(node: ::Prism::DefNode).void } + def on_def_node_leave(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#282 + sig { params(node: ::Prism::ImplicitNode).void } + def on_implicit_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#287 + sig { params(node: ::Prism::ImplicitNode).void } + def on_implicit_node_leave(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#145 + sig { params(node: ::Prism::KeywordRestParameterNode).void } + def on_keyword_rest_parameter_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#192 + sig { params(node: ::Prism::LocalVariableAndWriteNode).void } + def on_local_variable_and_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#198 + sig { params(node: ::Prism::LocalVariableOperatorWriteNode).void } + def on_local_variable_operator_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#204 + sig { params(node: ::Prism::LocalVariableOrWriteNode).void } + def on_local_variable_or_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#178 + sig { params(node: ::Prism::LocalVariableReadNode).void } + def on_local_variable_read_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#210 + sig { params(node: ::Prism::LocalVariableTargetNode).void } + def on_local_variable_target_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#172 + sig { params(node: ::Prism::LocalVariableWriteNode).void } + def on_local_variable_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#89 + sig { params(node: ::Prism::MatchWriteNode).void } + def on_match_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#99 + sig { params(node: ::Prism::MatchWriteNode).void } + def on_match_write_node_leave(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#261 + sig { params(node: ::Prism::ModuleNode).void } + def on_module_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#140 + sig { params(node: ::Prism::OptionalKeywordParameterNode).void } + def on_optional_keyword_parameter_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#151 + sig { params(node: ::Prism::OptionalParameterNode).void } + def on_optional_parameter_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#135 + sig { params(node: ::Prism::RequiredKeywordParameterNode).void } + def on_required_keyword_parameter_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#156 + sig { params(node: ::Prism::RequiredParameterNode).void } + def on_required_parameter_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#161 + sig { params(node: ::Prism::RestParameterNode).void } + def on_rest_parameter_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#167 + sig { params(node: ::Prism::SelfNode).void } + def on_self_node_enter(node); end + + private + + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#301 + sig { params(node: ::Prism::CallNode).void } + def process_regexp_locals(node); end + + # Textmate provides highlighting for a subset of these special Ruby-specific methods. We want to utilize that + # highlighting, so we avoid making a semantic token for it. + # + # source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#296 + sig { params(method_name: ::String).returns(T::Boolean) } + def special_method?(method_name); end +end + +# source://ruby-lsp/lib/ruby_lsp/listeners/semantic_highlighting.rb#10 +RubyLsp::Listeners::SemanticHighlighting::SPECIAL_RUBY_METHODS = T.let(T.unsafe(nil), Array) + +# source://ruby-lsp/lib/ruby_lsp/listeners/signature_help.rb#6 +class RubyLsp::Listeners::SignatureHelp + include ::RubyLsp::Requests::Support::Common + + # source://ruby-lsp/lib/ruby_lsp/listeners/signature_help.rb#19 + sig do + params( + response_builder: RubyLsp::ResponseBuilders::SignatureHelp, + global_state: ::RubyLsp::GlobalState, + node_context: ::RubyLsp::NodeContext, + dispatcher: ::Prism::Dispatcher, + sorbet_level: ::RubyLsp::RubyDocument::SorbetLevel + ).void + end + def initialize(response_builder, global_state, node_context, dispatcher, sorbet_level); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/signature_help.rb#30 + sig { params(node: ::Prism::CallNode).void } + def on_call_node_enter(node); end + + private + + # source://ruby-lsp/lib/ruby_lsp/listeners/signature_help.rb#73 + sig do + params( + node: ::Prism::CallNode, + signatures: T::Array[::RubyIndexer::Entry::Signature] + ).returns([::Integer, ::Integer]) + end + def determine_active_signature_and_parameter(node, signatures); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/signature_help.rb#105 + sig do + params( + signatures: T::Array[::RubyIndexer::Entry::Signature], + method_name: ::String, + methods: T::Array[::RubyIndexer::Entry], + title: ::String, + extra_links: T.nilable(::String) + ).returns(T::Array[::LanguageServer::Protocol::Interface::SignatureInformation]) + end + def generate_signatures(signatures, method_name, methods, title, extra_links); end +end + +# A notification to be sent to the client +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://ruby-lsp/lib/ruby_lsp/utils.rb#41 +class RubyLsp::Message + abstract! + + # source://ruby-lsp/lib/ruby_lsp/utils.rb#54 + sig { params(method: ::String, params: ::Object).void } + def initialize(method:, params:); end + + # source://ruby-lsp/lib/ruby_lsp/utils.rb#46 + sig { returns(::String) } + def method; end + + # source://ruby-lsp/lib/ruby_lsp/utils.rb#49 + sig { returns(::Object) } + def params; end + + # @abstract + # + # source://ruby-lsp/lib/ruby_lsp/utils.rb#60 + sig { abstract.returns(T::Hash[::Symbol, T.untyped]) } + def to_hash; end +end + +# This class allows listeners to access contextual information about a node in the AST, such as its parent, +# its namespace nesting, and the surrounding CallNode (e.g. a method call). +# +# source://ruby-lsp/lib/ruby_lsp/node_context.rb#7 +class RubyLsp::NodeContext + # source://ruby-lsp/lib/ruby_lsp/node_context.rb#38 + sig do + params( + node: T.nilable(::Prism::Node), + parent: T.nilable(::Prism::Node), + nesting_nodes: T::Array[T.any(::Prism::BlockNode, ::Prism::ClassNode, ::Prism::DefNode, ::Prism::LambdaNode, ::Prism::ModuleNode, ::Prism::ProgramNode, ::Prism::SingletonClassNode)], + call_node: T.nilable(::Prism::CallNode) + ).void + end + def initialize(node, parent, nesting_nodes, call_node); end + + # source://ruby-lsp/lib/ruby_lsp/node_context.rb#17 + sig { returns(T.nilable(::Prism::CallNode)) } + def call_node; end + + # source://ruby-lsp/lib/ruby_lsp/node_context.rb#50 + sig { returns(::String) } + def fully_qualified_name; end + + # source://ruby-lsp/lib/ruby_lsp/node_context.rb#55 + sig { returns(T::Array[::Symbol]) } + def locals_for_scope; end + + # source://ruby-lsp/lib/ruby_lsp/node_context.rb#14 + sig { returns(T::Array[::String]) } + def nesting; end + + # source://ruby-lsp/lib/ruby_lsp/node_context.rb#11 + sig { returns(T.nilable(::Prism::Node)) } + def node; end + + # @return [Prism::Node, nil] + # + # source://ruby-lsp/lib/ruby_lsp/node_context.rb#11 + def parent; end + + # source://ruby-lsp/lib/ruby_lsp/node_context.rb#20 + sig { returns(T.nilable(::String)) } + def surrounding_method; end + + private + + # source://ruby-lsp/lib/ruby_lsp/node_context.rb#83 + sig do + params( + nodes: T::Array[T.any(::Prism::BlockNode, ::Prism::ClassNode, ::Prism::DefNode, ::Prism::LambdaNode, ::Prism::ModuleNode, ::Prism::ProgramNode, ::Prism::SingletonClassNode)] + ).returns([T::Array[::String], T.nilable(::String)]) + end + def handle_nesting_nodes(nodes); end +end + +# source://ruby-lsp/lib/ruby_lsp/utils.rb#63 +class RubyLsp::Notification < ::RubyLsp::Message + # source://ruby-lsp/lib/ruby_lsp/utils.rb#150 + sig { override.returns(T::Hash[::Symbol, T.untyped]) } + def to_hash; end + + class << self + # source://ruby-lsp/lib/ruby_lsp/utils.rb#99 + sig do + params( + id: ::String, + title: ::String, + percentage: T.nilable(::Integer), + message: T.nilable(::String) + ).returns(::RubyLsp::Notification) + end + def progress_begin(id, title, percentage: T.unsafe(nil), message: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_lsp/utils.rb#136 + sig { params(id: ::String).returns(::RubyLsp::Notification) } + def progress_end(id); end + + # source://ruby-lsp/lib/ruby_lsp/utils.rb#121 + sig do + params( + id: ::String, + percentage: T.nilable(::Integer), + message: T.nilable(::String) + ).returns(::RubyLsp::Notification) + end + def progress_report(id, percentage: T.unsafe(nil), message: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_lsp/utils.rb#84 + sig { params(data: T::Hash[::Symbol, T.untyped]).returns(::RubyLsp::Notification) } + def telemetry(data); end + + # source://ruby-lsp/lib/ruby_lsp/utils.rb#76 + sig { params(message: ::String, type: ::Integer).returns(::RubyLsp::Notification) } + def window_log_message(message, type: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_lsp/utils.rb#68 + sig { params(message: ::String, type: ::Integer).returns(::RubyLsp::Notification) } + def window_show_message(message, type: T.unsafe(nil)); end + end +end + +# source://ruby-lsp/lib/ruby_lsp/rbs_document.rb#5 +class RubyLsp::RBSDocument < ::RubyLsp::Document + extend T::Generic + + ParseResultType = type_member { { fixed: T::Array[::RBS::AST::Declarations::Base] } } + + # source://ruby-lsp/lib/ruby_lsp/rbs_document.rb#12 + sig { params(source: ::String, version: ::Integer, uri: ::URI::Generic, encoding: ::Encoding).void } + def initialize(source:, version:, uri:, encoding: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_lsp/rbs_document.rb#38 + sig { override.returns(::RubyLsp::Document::LanguageId) } + def language_id; end + + # source://ruby-lsp/lib/ruby_lsp/rbs_document.rb#18 + sig { override.returns(T::Boolean) } + def parse!; end + + # source://ruby-lsp/lib/ruby_lsp/rbs_document.rb#33 + sig { override.returns(T::Boolean) } + def syntax_error?; end +end + +# source://ruby-lsp/lib/ruby_lsp/utils.rb#155 +class RubyLsp::Request < ::RubyLsp::Message + # source://ruby-lsp/lib/ruby_lsp/utils.rb#159 + sig { params(id: T.any(::Integer, ::String), method: ::String, params: ::Object).void } + def initialize(id:, method:, params:); end + + # source://ruby-lsp/lib/ruby_lsp/utils.rb#165 + sig { override.returns(T::Hash[::Symbol, T.untyped]) } + def to_hash; end +end + +# A request configuration, to turn on/off features +# +# source://ruby-lsp/lib/ruby_lsp/utils.rb#220 +class RubyLsp::RequestConfig + # source://ruby-lsp/lib/ruby_lsp/utils.rb#227 + sig { params(configuration: T::Hash[::Symbol, T::Boolean]).void } + def initialize(configuration); end + + # source://ruby-lsp/lib/ruby_lsp/utils.rb#224 + sig { returns(T::Hash[::Symbol, T::Boolean]) } + def configuration; end + + # @return [Hash{Symbol => Boolean}] + # + # source://ruby-lsp/lib/ruby_lsp/utils.rb#224 + def configuration=(_arg0); end + + # source://ruby-lsp/lib/ruby_lsp/utils.rb#232 + sig { params(feature: ::Symbol).returns(T.nilable(T::Boolean)) } + def enabled?(feature); end +end + +# source://ruby-lsp/lib/ruby_lsp/requests/support/selection_range.rb#5 +module RubyLsp::Requests; end + +# The [code action resolve](https://microsoft.github.io/language-server-protocol/specification#codeAction_resolve) +# request is used to to resolve the edit field for a given code action, if it is not already provided in the +# textDocument/codeAction response. We can use it for scenarios that require more computation such as refactoring. +# +# source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#9 +class RubyLsp::Requests::CodeActionResolve < ::RubyLsp::Requests::Request + include ::RubyLsp::Requests::Support::Common + + # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#27 + sig do + params( + document: RubyLsp::RubyDocument, + global_state: ::RubyLsp::GlobalState, + code_action: T::Hash[::Symbol, T.untyped] + ).void + end + def initialize(document, global_state, code_action); end + + # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#35 + sig do + override + .returns(T.any(::LanguageServer::Protocol::Interface::CodeAction, ::RubyLsp::Requests::CodeActionResolve::Error)) + end + def perform; end + + private + + # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#265 + sig do + params( + range: T::Hash[::Symbol, T.untyped], + new_text: ::String + ).returns(::LanguageServer::Protocol::Interface::TextEdit) + end + def create_text_edit(range, new_text); end + + # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#276 + sig { params(node: ::Prism::BlockNode, indentation: T.nilable(::String)).returns(::String) } + def recursively_switch_nested_block_styles(node, indentation); end + + # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#191 + sig do + returns(T.any(::LanguageServer::Protocol::Interface::CodeAction, ::RubyLsp::Requests::CodeActionResolve::Error)) + end + def refactor_method; end + + # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#91 + sig do + returns(T.any(::LanguageServer::Protocol::Interface::CodeAction, ::RubyLsp::Requests::CodeActionResolve::Error)) + end + def refactor_variable; end + + # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#305 + sig { params(body: ::Prism::Node, indentation: T.nilable(::String)).returns(::String) } + def switch_block_body(body, indentation); end + + # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#53 + sig do + returns(T.any(::LanguageServer::Protocol::Interface::CodeAction, ::RubyLsp::Requests::CodeActionResolve::Error)) + end + def switch_block_style; end +end + +# source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#16 +class RubyLsp::Requests::CodeActionResolve::CodeActionError < ::StandardError; end + +# source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#18 +class RubyLsp::Requests::CodeActionResolve::Error < ::T::Enum + enums do + EmptySelection = new + InvalidTargetRange = new + UnknownCodeAction = new + end +end + +# source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#14 +RubyLsp::Requests::CodeActionResolve::NEW_METHOD_NAME = T.let(T.unsafe(nil), String) + +# source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#13 +RubyLsp::Requests::CodeActionResolve::NEW_VARIABLE_NAME = T.let(T.unsafe(nil), String) + +# The [code actions](https://microsoft.github.io/language-server-protocol/specification#textDocument_codeAction) +# request informs the editor of RuboCop quick fixes that can be applied. These are accessible by hovering over a +# specific diagnostic. +# +# source://ruby-lsp/lib/ruby_lsp/requests/code_actions.rb#9 +class RubyLsp::Requests::CodeActions < ::RubyLsp::Requests::Request + # source://ruby-lsp/lib/ruby_lsp/requests/code_actions.rb#35 + sig do + params( + document: T.any(RubyLsp::ERBDocument, RubyLsp::RubyDocument), + range: T::Hash[::Symbol, T.untyped], + context: T::Hash[::Symbol, T.untyped] + ).void + end + def initialize(document, range, context); end + + # source://ruby-lsp/lib/ruby_lsp/requests/code_actions.rb#44 + sig { override.returns(T.nilable(T.all(::Object, T::Array[::LanguageServer::Protocol::Interface::CodeAction]))) } + def perform; end + + class << self + # source://ruby-lsp/lib/ruby_lsp/requests/code_actions.rb#20 + sig { returns(::LanguageServer::Protocol::Interface::CodeActionRegistrationOptions) } + def provider; end + end +end + +# source://ruby-lsp/lib/ruby_lsp/requests/code_actions.rb#13 +RubyLsp::Requests::CodeActions::EXTRACT_TO_METHOD_TITLE = T.let(T.unsafe(nil), String) + +# source://ruby-lsp/lib/ruby_lsp/requests/code_actions.rb#12 +RubyLsp::Requests::CodeActions::EXTRACT_TO_VARIABLE_TITLE = T.let(T.unsafe(nil), String) + +# source://ruby-lsp/lib/ruby_lsp/requests/code_actions.rb#14 +RubyLsp::Requests::CodeActions::TOGGLE_BLOCK_STYLE_TITLE = T.let(T.unsafe(nil), String) + +# The +# [code lens](https://microsoft.github.io/language-server-protocol/specification#textDocument_codeLens) +# request informs the editor of runnable commands such as testing and debugging. +# +# source://ruby-lsp/lib/ruby_lsp/requests/code_lens.rb#13 +class RubyLsp::Requests::CodeLens < ::RubyLsp::Requests::Request + # source://ruby-lsp/lib/ruby_lsp/requests/code_lens.rb#32 + sig { params(global_state: ::RubyLsp::GlobalState, uri: ::URI::Generic, dispatcher: ::Prism::Dispatcher).void } + def initialize(global_state, uri, dispatcher); end + + # source://ruby-lsp/lib/ruby_lsp/requests/code_lens.rb#46 + sig { override.returns(T::Array[::LanguageServer::Protocol::Interface::CodeLens]) } + def perform; end + + class << self + # source://ruby-lsp/lib/ruby_lsp/requests/code_lens.rb#20 + sig { returns(::LanguageServer::Protocol::Interface::CodeLensOptions) } + def provider; end + end +end + +# The [completion](https://microsoft.github.io/language-server-protocol/specification#textDocument_completion) +# suggests possible completions according to what the developer is typing. +# +# source://ruby-lsp/lib/ruby_lsp/requests/completion.rb#10 +class RubyLsp::Requests::Completion < ::RubyLsp::Requests::Request + # source://ruby-lsp/lib/ruby_lsp/requests/completion.rb#37 + sig do + params( + document: T.any(RubyLsp::ERBDocument, RubyLsp::RubyDocument), + global_state: ::RubyLsp::GlobalState, + params: T::Hash[::Symbol, T.untyped], + sorbet_level: ::RubyLsp::RubyDocument::SorbetLevel, + dispatcher: ::Prism::Dispatcher + ).void + end + def initialize(document, global_state, params, sorbet_level, dispatcher); end + + # source://ruby-lsp/lib/ruby_lsp/requests/completion.rb#99 + sig { override.returns(T::Array[::LanguageServer::Protocol::Interface::CompletionItem]) } + def perform; end + + class << self + # source://ruby-lsp/lib/ruby_lsp/requests/completion.rb#17 + sig { returns(::LanguageServer::Protocol::Interface::CompletionOptions) } + def provider; end + end +end + +# The [completionItem/resolve](https://microsoft.github.io/language-server-protocol/specification#completionItem_resolve) +# request provides additional information about the currently selected completion. Specifically, the `labelDetails` +# and `documentation` fields are provided, which are omitted from the completion items returned by +# `textDocument/completion`. +# +# The `labelDetails` field lists the files where the completion item is defined, and the `documentation` field +# includes any available documentation for those definitions. +# +# At most 10 definitions are included, to ensure low latency during request processing and rendering the completion +# item. +# +# source://ruby-lsp/lib/ruby_lsp/requests/completion_resolve.rb#16 +class RubyLsp::Requests::CompletionResolve < ::RubyLsp::Requests::Request + include ::RubyLsp::Requests::Support::Common + + # source://ruby-lsp/lib/ruby_lsp/requests/completion_resolve.rb#25 + sig { params(global_state: ::RubyLsp::GlobalState, item: T::Hash[::Symbol, T.untyped]).void } + def initialize(global_state, item); end + + # source://ruby-lsp/lib/ruby_lsp/requests/completion_resolve.rb#32 + sig { override.returns(T::Hash[::Symbol, T.untyped]) } + def perform; end + + private + + # source://ruby-lsp/lib/ruby_lsp/requests/completion_resolve.rb#81 + sig { params(item: T::Hash[::Symbol, T.untyped]).returns(T::Hash[::Symbol, T.untyped]) } + def keyword_resolve(item); end +end + +# set a limit on the number of documentation entries returned, to avoid rendering performance issues +# https://github.com/Shopify/ruby-lsp/pull/1798 +# +# source://ruby-lsp/lib/ruby_lsp/requests/completion_resolve.rb#22 +RubyLsp::Requests::CompletionResolve::MAX_DOCUMENTATION_ENTRIES = T.let(T.unsafe(nil), Integer) + +# The [definition +# request](https://microsoft.github.io/language-server-protocol/specification#textDocument_definition) jumps to the +# definition of the symbol under the cursor. +# +# source://ruby-lsp/lib/ruby_lsp/requests/definition.rb#11 +class RubyLsp::Requests::Definition < ::RubyLsp::Requests::Request + # source://ruby-lsp/lib/ruby_lsp/requests/definition.rb#24 + sig do + params( + document: T.any(RubyLsp::ERBDocument, RubyLsp::RubyDocument), + global_state: ::RubyLsp::GlobalState, + position: T::Hash[::Symbol, T.untyped], + dispatcher: ::Prism::Dispatcher, + sorbet_level: ::RubyLsp::RubyDocument::SorbetLevel + ).void + end + def initialize(document, global_state, position, dispatcher, sorbet_level); end + + # source://ruby-lsp/lib/ruby_lsp/requests/definition.rb#101 + sig do + override + .returns(T::Array[T.any(::LanguageServer::Protocol::Interface::Location, ::LanguageServer::Protocol::Interface::LocationLink)]) + end + def perform; end + + private + + # source://ruby-lsp/lib/ruby_lsp/requests/definition.rb#109 + sig { params(position: T::Hash[::Symbol, T.untyped], target: T.nilable(::Prism::Node)).returns(T::Boolean) } + def position_outside_target?(position, target); end +end + +# The +# [diagnostics](https://microsoft.github.io/language-server-protocol/specification#textDocument_publishDiagnostics) +# request informs the editor of RuboCop offenses for a given file. +# +# source://ruby-lsp/lib/ruby_lsp/requests/diagnostics.rb#9 +class RubyLsp::Requests::Diagnostics < ::RubyLsp::Requests::Request + # source://ruby-lsp/lib/ruby_lsp/requests/diagnostics.rb#26 + sig { params(global_state: ::RubyLsp::GlobalState, document: RubyLsp::RubyDocument).void } + def initialize(global_state, document); end + + # source://ruby-lsp/lib/ruby_lsp/requests/diagnostics.rb#34 + sig { override.returns(T.nilable(T.all(::Object, T::Array[::LanguageServer::Protocol::Interface::Diagnostic]))) } + def perform; end + + private + + # source://ruby-lsp/lib/ruby_lsp/requests/diagnostics.rb#77 + sig { returns(T::Array[::LanguageServer::Protocol::Interface::Diagnostic]) } + def syntax_error_diagnostics; end + + # source://ruby-lsp/lib/ruby_lsp/requests/diagnostics.rb#54 + sig { returns(T::Array[::LanguageServer::Protocol::Interface::Diagnostic]) } + def syntax_warning_diagnostics; end + + class << self + # source://ruby-lsp/lib/ruby_lsp/requests/diagnostics.rb#16 + sig { returns(::LanguageServer::Protocol::Interface::DiagnosticRegistrationOptions) } + def provider; end + end +end + +# The [document highlight](https://microsoft.github.io/language-server-protocol/specification#textDocument_documentHighlight) +# informs the editor all relevant elements of the currently pointed item for highlighting. For example, when +# the cursor is on the `F` of the constant `FOO`, the editor should identify other occurrences of `FOO` +# and highlight them. +# +# For writable elements like constants or variables, their read/write occurrences should be highlighted differently. +# This is achieved by sending different "kind" attributes to the editor (2 for read and 3 for write). +# +# source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#15 +class RubyLsp::Requests::DocumentHighlight < ::RubyLsp::Requests::Request + # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#26 + sig do + params( + global_state: ::RubyLsp::GlobalState, + document: T.any(RubyLsp::ERBDocument, RubyLsp::RubyDocument), + position: T::Hash[::Symbol, T.untyped], + dispatcher: ::Prism::Dispatcher + ).void + end + def initialize(global_state, document, position, dispatcher); end + + # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#51 + sig { override.returns(T::Array[::LanguageServer::Protocol::Interface::DocumentHighlight]) } + def perform; end +end + +# The [document link](https://microsoft.github.io/language-server-protocol/specification#textDocument_documentLink) +# makes `# source://PATH_TO_FILE#line` comments in a Ruby/RBI file clickable if the file exists. +# When the user clicks the link, it'll open that location. +# +# source://ruby-lsp/lib/ruby_lsp/requests/document_link.rb#11 +class RubyLsp::Requests::DocumentLink < ::RubyLsp::Requests::Request + # source://ruby-lsp/lib/ruby_lsp/requests/document_link.rb#30 + sig { params(uri: ::URI::Generic, comments: T::Array[::Prism::Comment], dispatcher: ::Prism::Dispatcher).void } + def initialize(uri, comments, dispatcher); end + + # source://ruby-lsp/lib/ruby_lsp/requests/document_link.rb#40 + sig { override.returns(T::Array[::LanguageServer::Protocol::Interface::DocumentLink]) } + def perform; end + + class << self + # source://ruby-lsp/lib/ruby_lsp/requests/document_link.rb#18 + sig { returns(::LanguageServer::Protocol::Interface::DocumentLinkOptions) } + def provider; end + end +end + +# The [document +# symbol](https://microsoft.github.io/language-server-protocol/specification#textDocument_documentSymbol) request +# informs the editor of all the important symbols, such as classes, variables, and methods, defined in a file. With +# this information, the editor can populate breadcrumbs, file outline and allow for fuzzy symbol searches. +# +# In VS Code, symbol search known as 'Go To Symbol in Editor' and can be accessed with Ctrl/Cmd-Shift-O, +# or by opening the command palette and inserting an `@` symbol. +# +# source://ruby-lsp/lib/ruby_lsp/requests/document_symbol.rb#15 +class RubyLsp::Requests::DocumentSymbol < ::RubyLsp::Requests::Request + # source://ruby-lsp/lib/ruby_lsp/requests/document_symbol.rb#28 + sig { params(uri: ::URI::Generic, dispatcher: ::Prism::Dispatcher).void } + def initialize(uri, dispatcher); end + + # source://ruby-lsp/lib/ruby_lsp/requests/document_symbol.rb#39 + sig { override.returns(T::Array[::LanguageServer::Protocol::Interface::DocumentSymbol]) } + def perform; end + + class << self + # source://ruby-lsp/lib/ruby_lsp/requests/document_symbol.rb#22 + sig { returns(::LanguageServer::Protocol::Interface::DocumentSymbolOptions) } + def provider; end + end +end + +# The [folding ranges](https://microsoft.github.io/language-server-protocol/specification#textDocument_foldingRange) +# request informs the editor of the ranges where and how code can be folded. +# +# source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#10 +class RubyLsp::Requests::FoldingRanges < ::RubyLsp::Requests::Request + # source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#27 + sig { params(comments: T::Array[::Prism::Comment], dispatcher: ::Prism::Dispatcher).void } + def initialize(comments, dispatcher); end + + # source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#40 + sig { override.returns(T::Array[::LanguageServer::Protocol::Interface::FoldingRange]) } + def perform; end + + class << self + # source://ruby-lsp/lib/ruby_lsp/requests/folding_ranges.rb#17 + sig { returns(::LanguageServer::Protocol::Interface::FoldingRangeRegistrationOptions) } + def provider; end + end +end + +# The [formatting](https://microsoft.github.io/language-server-protocol/specification#textDocument_formatting) +# request uses RuboCop to fix auto-correctable offenses in the document. This requires enabling format on save and +# registering the ruby-lsp as the Ruby formatter. +# +# source://ruby-lsp/lib/ruby_lsp/requests/formatting.rb#9 +class RubyLsp::Requests::Formatting < ::RubyLsp::Requests::Request + # source://ruby-lsp/lib/ruby_lsp/requests/formatting.rb#28 + sig { params(global_state: ::RubyLsp::GlobalState, document: RubyLsp::RubyDocument).void } + def initialize(global_state, document); end + + # source://ruby-lsp/lib/ruby_lsp/requests/formatting.rb#36 + sig { override.returns(T.nilable(T.all(::Object, T::Array[::LanguageServer::Protocol::Interface::TextEdit]))) } + def perform; end + + class << self + # source://ruby-lsp/lib/ruby_lsp/requests/formatting.rb#18 + sig { returns(::LanguageServer::Protocol::Interface::DocumentFormattingRegistrationOptions) } + def provider; end + end +end + +# source://ruby-lsp/lib/ruby_lsp/requests/formatting.rb#12 +class RubyLsp::Requests::Formatting::Error < ::StandardError; end + +# The [hover request](https://microsoft.github.io/language-server-protocol/specification#textDocument_hover) +# displays the documentation for the symbol currently under the cursor. +# +# source://ruby-lsp/lib/ruby_lsp/requests/hover.rb#10 +class RubyLsp::Requests::Hover < ::RubyLsp::Requests::Request + extend T::Generic + + ResponseType = type_member { { fixed: T.nilable(::LanguageServer::Protocol::Interface::Hover) } } + + # source://ruby-lsp/lib/ruby_lsp/requests/hover.rb#34 + sig do + params( + document: T.any(RubyLsp::ERBDocument, RubyLsp::RubyDocument), + global_state: ::RubyLsp::GlobalState, + position: T::Hash[::Symbol, T.untyped], + dispatcher: ::Prism::Dispatcher, + sorbet_level: ::RubyLsp::RubyDocument::SorbetLevel + ).void + end + def initialize(document, global_state, position, dispatcher, sorbet_level); end + + # source://ruby-lsp/lib/ruby_lsp/requests/hover.rb#74 + sig { override.returns(ResponseType) } + def perform; end + + private + + # source://ruby-lsp/lib/ruby_lsp/requests/hover.rb#99 + sig { params(position: T::Hash[::Symbol, T.untyped], target: T.nilable(::Prism::Node)).returns(T::Boolean) } + def position_outside_target?(position, target); end + + # source://ruby-lsp/lib/ruby_lsp/requests/hover.rb#92 + sig { params(parent: T.nilable(::Prism::Node), target: T.nilable(::Prism::Node)).returns(T::Boolean) } + def should_refine_target?(parent, target); end + + class << self + # source://ruby-lsp/lib/ruby_lsp/requests/hover.rb#18 + sig { returns(::LanguageServer::Protocol::Interface::HoverOptions) } + def provider; end + end +end + +# [Inlay hints](https://microsoft.github.io/language-server-protocol/specification#textDocument_inlayHint) +# are labels added directly in the code that explicitly show the user something that might +# otherwise just be implied. +# +# source://ruby-lsp/lib/ruby_lsp/requests/inlay_hints.rb#11 +class RubyLsp::Requests::InlayHints < ::RubyLsp::Requests::Request + # source://ruby-lsp/lib/ruby_lsp/requests/inlay_hints.rb#30 + sig do + params( + document: T.any(RubyLsp::ERBDocument, RubyLsp::RubyDocument), + hints_configuration: ::RubyLsp::RequestConfig, + dispatcher: ::Prism::Dispatcher + ).void + end + def initialize(document, hints_configuration, dispatcher); end + + # source://ruby-lsp/lib/ruby_lsp/requests/inlay_hints.rb#41 + sig { override.returns(T::Array[::LanguageServer::Protocol::Interface::InlayHint]) } + def perform; end + + class << self + # source://ruby-lsp/lib/ruby_lsp/requests/inlay_hints.rb#18 + sig { returns(::LanguageServer::Protocol::Interface::InlayHintOptions) } + def provider; end + end +end + +# The [on type formatting](https://microsoft.github.io/language-server-protocol/specification#textDocument_onTypeFormatting) +# request formats code as the user is typing. For example, automatically adding `end` to class definitions. +# +# source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#8 +class RubyLsp::Requests::OnTypeFormatting < ::RubyLsp::Requests::Request + # source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#41 + sig do + params( + document: RubyLsp::RubyDocument, + position: T::Hash[::Symbol, T.untyped], + trigger_character: ::String, + client_name: ::String + ).void + end + def initialize(document, position, trigger_character, client_name); end + + # source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#56 + sig { override.returns(T.all(::Object, T::Array[::LanguageServer::Protocol::Interface::TextEdit])) } + def perform; end + + private + + # source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#159 + sig { params(text: ::String, position: T::Hash[::Symbol, T.untyped]).void } + def add_edit_with_text(text, position = T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#206 + sig { void } + def auto_indent_after_end_keyword; end + + # source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#193 + sig { params(line: ::String).returns(::Integer) } + def find_indentation(line); end + + # source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#154 + sig { params(spaces: ::String).void } + def handle_comment_line(spaces); end + + # source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#116 + sig { void } + def handle_curly_brace; end + + # source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#146 + sig { params(delimiter: ::String).void } + def handle_heredoc_end(delimiter); end + + # source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#85 + sig { void } + def handle_pipe; end + + # source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#124 + sig { void } + def handle_statement_end; end + + # source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#172 + sig { params(line: ::Integer, character: ::Integer).void } + def move_cursor_to(line, character); end + + class << self + # source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#15 + sig { returns(::LanguageServer::Protocol::Interface::DocumentOnTypeFormattingRegistrationOptions) } + def provider; end + end +end + +# source://ruby-lsp/lib/ruby_lsp/requests/on_type_formatting.rb#24 +RubyLsp::Requests::OnTypeFormatting::END_REGEXES = T.let(T.unsafe(nil), Array) + +# The [prepare type hierarchy +# request](https://microsoft.github.io/language-server-protocol/specification#textDocument_prepareTypeHierarchy) +# displays the list of ancestors (supertypes) and descendants (subtypes) for the selected type. +# +# Currently only supports supertypes due to a limitation of the index. +# +# source://ruby-lsp/lib/ruby_lsp/requests/prepare_type_hierarchy.rb#11 +class RubyLsp::Requests::PrepareTypeHierarchy < ::RubyLsp::Requests::Request + include ::RubyLsp::Requests::Support::Common + + # source://ruby-lsp/lib/ruby_lsp/requests/prepare_type_hierarchy.rb#32 + sig do + params( + document: T.any(RubyLsp::ERBDocument, RubyLsp::RubyDocument), + index: ::RubyIndexer::Index, + position: T::Hash[::Symbol, T.untyped] + ).void + end + def initialize(document, index, position); end + + # source://ruby-lsp/lib/ruby_lsp/requests/prepare_type_hierarchy.rb#41 + sig { override.returns(T.nilable(T::Array[::LanguageServer::Protocol::Interface::TypeHierarchyItem])) } + def perform; end + + class << self + # source://ruby-lsp/lib/ruby_lsp/requests/prepare_type_hierarchy.rb#20 + sig { returns(::LanguageServer::Protocol::Interface::TypeHierarchyOptions) } + def provider; end + end +end + +# The [range formatting](https://microsoft.github.io/language-server-protocol/specification#textDocument_rangeFormatting) +# is used to format a selection or to format on paste. +# +# source://ruby-lsp/lib/ruby_lsp/requests/range_formatting.rb#8 +class RubyLsp::Requests::RangeFormatting < ::RubyLsp::Requests::Request + # source://ruby-lsp/lib/ruby_lsp/requests/range_formatting.rb#12 + sig do + params( + global_state: ::RubyLsp::GlobalState, + document: RubyLsp::RubyDocument, + params: T::Hash[::Symbol, T.untyped] + ).void + end + def initialize(global_state, document, params); end + + # source://ruby-lsp/lib/ruby_lsp/requests/range_formatting.rb#21 + sig { override.returns(T.nilable(T::Array[::LanguageServer::Protocol::Interface::TextEdit])) } + def perform; end +end + +# The +# [references](https://microsoft.github.io/language-server-protocol/specification#textDocument_references) +# request finds all references for the selected symbol. +# +# source://ruby-lsp/lib/ruby_lsp/requests/references.rb#9 +class RubyLsp::Requests::References < ::RubyLsp::Requests::Request + include ::RubyLsp::Requests::Support::Common + + # source://ruby-lsp/lib/ruby_lsp/requests/references.rb#21 + sig do + params( + global_state: ::RubyLsp::GlobalState, + store: ::RubyLsp::Store, + document: T.any(RubyLsp::ERBDocument, RubyLsp::RubyDocument), + params: T::Hash[::Symbol, T.untyped] + ).void + end + def initialize(global_state, store, document, params); end + + # source://ruby-lsp/lib/ruby_lsp/requests/references.rb#31 + sig { override.returns(T::Array[::LanguageServer::Protocol::Interface::Location]) } + def perform; end + + private + + # source://ruby-lsp/lib/ruby_lsp/requests/references.rb#129 + sig do + params( + target: ::RubyIndexer::ReferenceFinder::Target, + parse_result: ::Prism::ParseResult, + uri: ::URI::Generic + ).void + end + def collect_references(target, parse_result, uri); end + + # source://ruby-lsp/lib/ruby_lsp/requests/references.rb#106 + sig do + params( + target_node: T.any(::Prism::CallNode, ::Prism::ConstantPathNode, ::Prism::ConstantPathTargetNode, ::Prism::ConstantReadNode, ::Prism::DefNode), + node_context: ::RubyLsp::NodeContext + ).returns(T.nilable(::RubyIndexer::ReferenceFinder::Target)) + end + def create_reference_target(target_node, node_context); end +end + +# The +# [rename](https://microsoft.github.io/language-server-protocol/specification#textDocument_rename) +# request renames all instances of a symbol in a document. +# +# source://ruby-lsp/lib/ruby_lsp/requests/rename.rb#9 +class RubyLsp::Requests::Rename < ::RubyLsp::Requests::Request + include ::RubyLsp::Requests::Support::Common + + # source://ruby-lsp/lib/ruby_lsp/requests/rename.rb#23 + sig do + params( + global_state: ::RubyLsp::GlobalState, + store: ::RubyLsp::Store, + document: T.any(RubyLsp::ERBDocument, RubyLsp::RubyDocument), + params: T::Hash[::Symbol, T.untyped] + ).void + end + def initialize(global_state, store, document, params); end + + # source://ruby-lsp/lib/ruby_lsp/requests/rename.rb#33 + sig { override.returns(T.nilable(::LanguageServer::Protocol::Interface::WorkspaceEdit)) } + def perform; end + + private + + # source://ruby-lsp/lib/ruby_lsp/requests/rename.rb#181 + sig do + params( + name: ::String, + reference: ::RubyIndexer::ReferenceFinder::Reference + ).returns(::LanguageServer::Protocol::Interface::TextEdit) + end + def adjust_reference_for_edit(name, reference); end + + # source://ruby-lsp/lib/ruby_lsp/requests/rename.rb#170 + sig do + params( + target: ::RubyIndexer::ReferenceFinder::Target, + parse_result: ::Prism::ParseResult, + name: ::String, + uri: ::URI::Generic + ).returns(T::Array[::LanguageServer::Protocol::Interface::TextEdit]) + end + def collect_changes(target, parse_result, name, uri); end + + # source://ruby-lsp/lib/ruby_lsp/requests/rename.rb#100 + sig do + params( + fully_qualified_name: ::String, + document_changes: T::Array[T.any(::LanguageServer::Protocol::Interface::RenameFile, ::LanguageServer::Protocol::Interface::TextDocumentEdit)] + ).void + end + def collect_file_renames(fully_qualified_name, document_changes); end + + # source://ruby-lsp/lib/ruby_lsp/requests/rename.rb#138 + sig do + params( + target: ::RubyIndexer::ReferenceFinder::Target, + name: ::String + ).returns(T::Hash[::String, T::Array[::LanguageServer::Protocol::Interface::TextEdit]]) + end + def collect_text_edits(target, name); end + + # source://ruby-lsp/lib/ruby_lsp/requests/rename.rb#191 + sig { params(constant_name: ::String).returns(::String) } + def file_from_constant_name(constant_name); end +end + +# source://ruby-lsp/lib/ruby_lsp/requests/rename.rb#13 +class RubyLsp::Requests::Rename::InvalidNameError < ::StandardError; end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://ruby-lsp/lib/ruby_lsp/requests/request.rb#6 +class RubyLsp::Requests::Request + abstract! + + # @abstract + # + # source://ruby-lsp/lib/ruby_lsp/requests/request.rb#15 + sig { abstract.returns(T.anything) } + def perform; end + + private + + # Checks if a location covers a position + # + # source://ruby-lsp/lib/ruby_lsp/requests/request.rb#38 + sig { params(location: ::Prism::Location, position: T.untyped).returns(T::Boolean) } + def cover?(location, position); end + + # Checks if a given location covers the position requested + # + # source://ruby-lsp/lib/ruby_lsp/requests/request.rb#87 + sig { params(location: T.nilable(::Prism::Location), position: T::Hash[::Symbol, T.untyped]).returns(T::Boolean) } + def covers_position?(location, position); end + + # Signals to the client that the request should be delegated to the language server server for the host language + # in ERB files + # + # source://ruby-lsp/lib/ruby_lsp/requests/request.rb#28 + sig do + params( + global_state: ::RubyLsp::GlobalState, + document: RubyLsp::Document[T.untyped], + char_position: ::Integer + ).void + end + def delegate_request_if_needed!(global_state, document, char_position); end + + # Based on a constant node target, a constant path node parent and a position, this method will find the exact + # portion of the constant path that matches the requested position, for higher precision in hover and + # definition. For example: + # + # ```ruby + # Foo::Bar::Baz + # # ^ Going to definition here should go to Foo::Bar::Baz + # # ^ Going to definition here should go to Foo::Bar + # #^ Going to definition here should go to Foo + # ``` + # + # source://ruby-lsp/lib/ruby_lsp/requests/request.rb#71 + sig do + params( + target: ::Prism::Node, + parent: ::Prism::Node, + position: T::Hash[::Symbol, ::Integer] + ).returns(::Prism::Node) + end + def determine_target(target, parent, position); end +end + +# source://ruby-lsp/lib/ruby_lsp/requests/request.rb#10 +class RubyLsp::Requests::Request::InvalidFormatter < ::StandardError; end + +# The [selection ranges](https://microsoft.github.io/language-server-protocol/specification#textDocument_selectionRange) +# request informs the editor of ranges that the user may want to select based on the location(s) +# of their cursor(s). +# +# Trigger this request with: Ctrl + Shift + -> or Ctrl + Shift + <- +# +# Note that if using VSCode Neovim, you will need to be in Insert mode for this to work correctly. +# +# source://ruby-lsp/lib/ruby_lsp/requests/selection_ranges.rb#13 +class RubyLsp::Requests::SelectionRanges < ::RubyLsp::Requests::Request + include ::RubyLsp::Requests::Support::Common + + # source://ruby-lsp/lib/ruby_lsp/requests/selection_ranges.rb#18 + sig { params(document: T.any(RubyLsp::ERBDocument, RubyLsp::RubyDocument)).void } + def initialize(document); end + + # source://ruby-lsp/lib/ruby_lsp/requests/selection_ranges.rb#26 + sig { override.returns(T.all(::Object, T::Array[::RubyLsp::Requests::Support::SelectionRange])) } + def perform; end +end + +# The [semantic +# highlighting](https://microsoft.github.io/language-server-protocol/specification#textDocument_semanticTokens) +# request informs the editor of the correct token types to provide consistent and accurate highlighting for themes. +# +# source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#11 +class RubyLsp::Requests::SemanticHighlighting < ::RubyLsp::Requests::Request + # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#96 + sig do + params( + global_state: ::RubyLsp::GlobalState, + dispatcher: ::Prism::Dispatcher, + document: T.any(RubyLsp::ERBDocument, RubyLsp::RubyDocument), + previous_result_id: T.nilable(::String), + range: T.nilable(T::Range[::Integer]) + ).void + end + def initialize(global_state, dispatcher, document, previous_result_id, range: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#115 + sig do + override + .returns(T.any(::LanguageServer::Protocol::Interface::SemanticTokens, ::LanguageServer::Protocol::Interface::SemanticTokensDelta)) + end + def perform; end + + class << self + # The compute_delta method receives the current semantic tokens and the previous semantic tokens and then tries + # to compute the smallest possible semantic token edit that will turn previous into current + # + # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#39 + sig do + params( + current_tokens: T::Array[::Integer], + previous_tokens: T::Array[::Integer], + result_id: ::String + ).returns(::LanguageServer::Protocol::Interface::SemanticTokensDelta) + end + def compute_delta(current_tokens, previous_tokens, result_id); end + + # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#77 + sig { returns(::Integer) } + def next_result_id; end + + # source://ruby-lsp/lib/ruby_lsp/requests/semantic_highlighting.rb#18 + sig { returns(::LanguageServer::Protocol::Interface::SemanticTokensRegistrationOptions) } + def provider; end + end +end + +# Show syntax tree is a custom [LSP +# request](https://microsoft.github.io/language-server-protocol/specification#requestMessage) that displays the AST +# for the current document or for the current selection in a new tab. +# +# source://ruby-lsp/lib/ruby_lsp/requests/show_syntax_tree.rb#9 +class RubyLsp::Requests::ShowSyntaxTree < ::RubyLsp::Requests::Request + # source://ruby-lsp/lib/ruby_lsp/requests/show_syntax_tree.rb#13 + sig { params(document: RubyLsp::RubyDocument, range: T.nilable(T::Hash[::Symbol, T.untyped])).void } + def initialize(document, range); end + + # source://ruby-lsp/lib/ruby_lsp/requests/show_syntax_tree.rb#21 + sig { override.returns(::String) } + def perform; end + + private + + # source://ruby-lsp/lib/ruby_lsp/requests/show_syntax_tree.rb#32 + sig { returns(::String) } + def ast_for_range; end +end + +# The [signature help +# request](https://microsoft.github.io/language-server-protocol/specification#textDocument_signatureHelp) displays +# information about the parameters of a method as you type an invocation. +# +# source://ruby-lsp/lib/ruby_lsp/requests/signature_help.rb#11 +class RubyLsp::Requests::SignatureHelp < ::RubyLsp::Requests::Request + # source://ruby-lsp/lib/ruby_lsp/requests/signature_help.rb#36 + sig do + params( + document: T.any(RubyLsp::ERBDocument, RubyLsp::RubyDocument), + global_state: ::RubyLsp::GlobalState, + position: T::Hash[::Symbol, T.untyped], + context: T.nilable(T::Hash[::Symbol, T.untyped]), + dispatcher: ::Prism::Dispatcher, + sorbet_level: ::RubyLsp::RubyDocument::SorbetLevel + ).void + end + def initialize(document, global_state, position, context, dispatcher, sorbet_level); end + + # source://ruby-lsp/lib/ruby_lsp/requests/signature_help.rb#58 + sig { override.returns(T.nilable(::LanguageServer::Protocol::Interface::SignatureHelp)) } + def perform; end + + private + + # Adjust the target of signature help in the case where we have nested method calls. This is necessary so that we + # select the right target in a situation like this: + # + # foo(another_method_call) + # + # In that case, we want to provide signature help for `foo` and not `another_method_call`. + # + # source://ruby-lsp/lib/ruby_lsp/requests/signature_help.rb#80 + sig do + params( + target: T.nilable(::Prism::Node), + parent: T.nilable(::Prism::Node), + position: T::Hash[::Symbol, T.untyped] + ).returns(T.nilable(::Prism::Node)) + end + def adjust_for_nested_target(target, parent, position); end + + # source://ruby-lsp/lib/ruby_lsp/requests/signature_help.rb#96 + sig { params(node: ::Prism::Node, position: T::Hash[::Symbol, T.untyped]).returns(T::Boolean) } + def node_covers?(node, position); end + + class << self + # source://ruby-lsp/lib/ruby_lsp/requests/signature_help.rb#18 + sig { returns(::LanguageServer::Protocol::Interface::SignatureHelpOptions) } + def provider; end + end +end + +# source://ruby-lsp/lib/ruby_lsp/requests/support/selection_range.rb#6 +module RubyLsp::Requests::Support; end + +# source://ruby-lsp/lib/ruby_lsp/requests/support/annotation.rb#7 +class RubyLsp::Requests::Support::Annotation + # source://ruby-lsp/lib/ruby_lsp/requests/support/annotation.rb#15 + sig { params(arity: T.any(::Integer, T::Range[::Integer]), receiver: T::Boolean).void } + def initialize(arity:, receiver: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_lsp/requests/support/annotation.rb#21 + sig { params(node: ::Prism::CallNode).returns(T::Boolean) } + def match?(node); end + + private + + # source://ruby-lsp/lib/ruby_lsp/requests/support/annotation.rb#34 + sig { params(node: ::Prism::CallNode).returns(T::Boolean) } + def arity_matches?(node); end + + # source://ruby-lsp/lib/ruby_lsp/requests/support/annotation.rb#28 + sig { params(node: ::Prism::CallNode).returns(T::Boolean) } + def receiver_matches?(node); end +end + +# source://ruby-lsp/lib/ruby_lsp/requests/support/common.rb#7 +module RubyLsp::Requests::Support::Common + requires_ancestor { Kernel } + + # source://ruby-lsp/lib/ruby_lsp/requests/support/common.rb#83 + sig do + params( + title: ::String, + entries: T.any(::RubyIndexer::Entry, T::Array[::RubyIndexer::Entry]), + max_entries: T.nilable(::Integer) + ).returns(T::Hash[::Symbol, ::String]) + end + def categorized_markdown_from_index_entries(title, entries, max_entries = T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_lsp/requests/support/common.rb#151 + sig do + params( + node: T.any(::Prism::ConstantPathNode, ::Prism::ConstantPathTargetNode, ::Prism::ConstantReadNode) + ).returns(T.nilable(::String)) + end + def constant_name(node); end + + # source://ruby-lsp/lib/ruby_lsp/requests/support/common.rb#49 + sig do + params( + node: ::Prism::Node, + title: ::String, + command_name: ::String, + arguments: T.nilable(T::Array[T.untyped]), + data: T.nilable(T::Hash[T.untyped, T.untyped]) + ).returns(::LanguageServer::Protocol::Interface::CodeLens) + end + def create_code_lens(node, title:, command_name:, arguments:, data:); end + + # Iterates over each part of a constant path, so that we can easily push response items for each section of the + # name. For example, for `Foo::Bar::Baz`, this method will invoke the block with `Foo`, then `Bar` and finally + # `Baz`. + # + # source://ruby-lsp/lib/ruby_lsp/requests/support/common.rb#176 + sig { params(node: ::Prism::Node, block: T.proc.params(part: ::Prism::Node).void).void } + def each_constant_path_part(node, &block); end + + # source://ruby-lsp/lib/ruby_lsp/requests/support/common.rb#186 + sig { params(entry: ::RubyIndexer::Entry).returns(T.nilable(::Integer)) } + def kind_for_entry(entry); end + + # source://ruby-lsp/lib/ruby_lsp/requests/support/common.rb#127 + sig do + params( + title: ::String, + entries: T.any(::RubyIndexer::Entry, T::Array[::RubyIndexer::Entry]), + max_entries: T.nilable(::Integer), + extra_links: T.nilable(::String) + ).returns(::String) + end + def markdown_from_index_entries(title, entries, max_entries = T.unsafe(nil), extra_links: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_lsp/requests/support/common.rb#159 + sig { params(node: T.any(::Prism::ClassNode, ::Prism::ModuleNode)).returns(T.nilable(::String)) } + def namespace_constant_name(node); end + + # source://ruby-lsp/lib/ruby_lsp/requests/support/common.rb#64 + sig { params(file_path: ::String).returns(T.nilable(T::Boolean)) } + def not_in_dependencies?(file_path); end + + # source://ruby-lsp/lib/ruby_lsp/requests/support/common.rb#30 + sig do + params( + location: T.any(::Prism::Location, ::RubyIndexer::Location) + ).returns(::LanguageServer::Protocol::Interface::Range) + end + def range_from_location(location); end + + # source://ruby-lsp/lib/ruby_lsp/requests/support/common.rb#17 + sig { params(node: ::Prism::Node).returns(::LanguageServer::Protocol::Interface::Range) } + def range_from_node(node); end + + # source://ruby-lsp/lib/ruby_lsp/requests/support/common.rb#71 + sig { params(node: ::Prism::CallNode).returns(T::Boolean) } + def self_receiver?(node); end + + # source://ruby-lsp/lib/ruby_lsp/requests/support/common.rb#204 + sig { params(sorbet_level: ::RubyLsp::RubyDocument::SorbetLevel).returns(T::Boolean) } + def sorbet_level_true_or_higher?(sorbet_level); end +end + +# @abstract Subclasses must implement the `abstract` methods below. +# +# source://ruby-lsp/lib/ruby_lsp/requests/support/formatter.rb#7 +module RubyLsp::Requests::Support::Formatter + interface! + + # @abstract + # + # source://ruby-lsp/lib/ruby_lsp/requests/support/formatter.rb#25 + sig do + abstract + .params( + uri: ::URI::Generic, + document: RubyLsp::RubyDocument + ).returns(T.nilable(T::Array[::LanguageServer::Protocol::Interface::Diagnostic])) + end + def run_diagnostic(uri, document); end + + # @abstract + # + # source://ruby-lsp/lib/ruby_lsp/requests/support/formatter.rb#14 + sig { abstract.params(uri: ::URI::Generic, document: RubyLsp::RubyDocument).returns(T.nilable(::String)) } + def run_formatting(uri, document); end + + # @abstract + # + # source://ruby-lsp/lib/ruby_lsp/requests/support/formatter.rb#17 + sig do + abstract + .params( + uri: ::URI::Generic, + source: ::String, + base_indentation: ::Integer + ).returns(T.nilable(::String)) + end + def run_range_formatting(uri, source, base_indentation); end +end + +# source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#34 +class RubyLsp::Requests::Support::InternalRuboCopError < ::StandardError + # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#44 + sig { params(rubocop_error: T.any(::RuboCop::ErrorWithAnalyzedFileLocation, ::StandardError)).void } + def initialize(rubocop_error); end +end + +# source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#37 +RubyLsp::Requests::Support::InternalRuboCopError::MESSAGE = T.let(T.unsafe(nil), String) + +# source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_diagnostic.rb#7 +class RubyLsp::Requests::Support::RuboCopDiagnostic + # TODO: avoid passing document once we have alternative ways to get at + # encoding and file source + # + # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_diagnostic.rb#35 + sig { params(document: RubyLsp::RubyDocument, offense: ::RuboCop::Cop::Offense, uri: ::URI::Generic).void } + def initialize(document, offense, uri); end + + # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_diagnostic.rb#42 + sig { returns(T::Array[::LanguageServer::Protocol::Interface::CodeAction]) } + def to_lsp_code_actions; end + + # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_diagnostic.rb#52 + sig { params(config: ::RuboCop::Config).returns(::LanguageServer::Protocol::Interface::Diagnostic) } + def to_lsp_diagnostic(config); end + + private + + # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_diagnostic.rb#107 + sig { returns(::LanguageServer::Protocol::Interface::CodeAction) } + def autocorrect_action; end + + # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_diagnostic.rb#94 + sig { params(config: ::RuboCop::Config).returns(T.nilable(::LanguageServer::Protocol::Interface::CodeDescription)) } + def code_description(config); end + + # When `RuboCop::LSP.enable` is called, contextual autocorrect will not offer itself + # as `correctable?` to prevent annoying changes while typing. Instead check if + # a corrector is present. If it is, then that means some code transformation can be applied. + # + # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_diagnostic.rb#201 + sig { returns(T::Boolean) } + def correctable?; end + + # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_diagnostic.rb#140 + sig { returns(::LanguageServer::Protocol::Interface::CodeAction) } + def disable_line_action; end + + # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_diagnostic.rb#182 + sig { params(line: ::String).returns(::Integer) } + def length_of_line(line); end + + # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_diagnostic.rb#159 + sig { returns(T::Array[::LanguageServer::Protocol::Interface::TextEdit]) } + def line_disable_comment; end + + # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_diagnostic.rb#82 + sig { returns(::String) } + def message; end + + # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_diagnostic.rb#127 + sig { returns(T::Array[::LanguageServer::Protocol::Interface::TextEdit]) } + def offense_replacements; end + + # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_diagnostic.rb#89 + sig { returns(T.nilable(::Integer)) } + def severity; end +end + +# source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_diagnostic.rb#22 +RubyLsp::Requests::Support::RuboCopDiagnostic::ENHANCED_DOC_URL = T.let(T.unsafe(nil), TrueClass) + +# source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_diagnostic.rb#10 +RubyLsp::Requests::Support::RuboCopDiagnostic::RUBOCOP_TO_LSP_SEVERITY = T.let(T.unsafe(nil), Hash) + +# source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_formatter.rb#11 +class RubyLsp::Requests::Support::RuboCopFormatter + include ::RubyLsp::Requests::Support::Formatter + + # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_formatter.rb#16 + sig { void } + def initialize; end + + # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_formatter.rb#43 + sig do + override + .params( + uri: ::URI::Generic, + document: RubyLsp::RubyDocument + ).returns(T.nilable(T::Array[::LanguageServer::Protocol::Interface::Diagnostic])) + end + def run_diagnostic(uri, document); end + + # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_formatter.rb#23 + sig { override.params(uri: ::URI::Generic, document: RubyLsp::RubyDocument).returns(T.nilable(::String)) } + def run_formatting(uri, document); end + + # RuboCop does not support range formatting + # + # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_formatter.rb#33 + sig do + override + .params( + uri: ::URI::Generic, + source: ::String, + base_indentation: ::Integer + ).returns(T.nilable(::String)) + end + def run_range_formatting(uri, source, base_indentation); end +end + +# source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#56 +class RubyLsp::Requests::Support::RuboCopRunner < ::RuboCop::Runner + # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#86 + sig { params(args: ::String).void } + def initialize(*args); end + + # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#75 + sig { returns(::RuboCop::Config) } + def config_for_working_directory; end + + # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#125 + sig { returns(::String) } + def formatted_source; end + + # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#72 + sig { returns(T::Array[::RuboCop::Cop::Offense]) } + def offenses; end + + # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#103 + sig { params(path: ::String, contents: ::String).void } + def run(path, contents); end + + private + + # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#151 + sig { params(_file: ::String, offenses: T::Array[::RuboCop::Cop::Offense]).void } + def file_finished(_file, offenses); end + + class << self + # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#133 + sig { params(cop_name: ::String).returns(T.nilable(T.class_of(RuboCop::Cop::Base))) } + def find_cop_by_name(cop_name); end + + private + + # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#140 + sig { returns(T::Hash[::String, [T.class_of(RuboCop::Cop::Base)]]) } + def cop_registry; end + end +end + +# source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#59 +class RubyLsp::Requests::Support::RuboCopRunner::ConfigurationError < ::StandardError; end + +# source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#61 +RubyLsp::Requests::Support::RuboCopRunner::DEFAULT_ARGS = T.let(T.unsafe(nil), Array) + +# source://ruby-lsp/lib/ruby_lsp/requests/support/selection_range.rb#7 +class RubyLsp::Requests::Support::SelectionRange < ::LanguageServer::Protocol::Interface::SelectionRange + # source://ruby-lsp/lib/ruby_lsp/requests/support/selection_range.rb#11 + sig { params(position: T::Hash[::Symbol, T.untyped]).returns(T::Boolean) } + def cover?(position); end +end + +# source://ruby-lsp/lib/ruby_lsp/requests/support/sorbet.rb#7 +class RubyLsp::Requests::Support::Sorbet + class << self + # source://ruby-lsp/lib/ruby_lsp/requests/support/sorbet.rb#48 + sig { params(node: ::Prism::CallNode).returns(T::Boolean) } + def annotation?(node); end + end +end + +# The [type hierarchy supertypes +# request](https://microsoft.github.io/language-server-protocol/specification#typeHierarchy_supertypes) +# displays the list of ancestors (supertypes) for the selected type. +# +# source://ruby-lsp/lib/ruby_lsp/requests/type_hierarchy_supertypes.rb#9 +class RubyLsp::Requests::TypeHierarchySupertypes < ::RubyLsp::Requests::Request + include ::RubyLsp::Requests::Support::Common + + # source://ruby-lsp/lib/ruby_lsp/requests/type_hierarchy_supertypes.rb#15 + sig { params(index: ::RubyIndexer::Index, item: T::Hash[::Symbol, T.untyped]).void } + def initialize(index, item); end + + # source://ruby-lsp/lib/ruby_lsp/requests/type_hierarchy_supertypes.rb#23 + sig { override.returns(T.nilable(T::Array[::LanguageServer::Protocol::Interface::TypeHierarchyItem])) } + def perform; end + + private + + # source://ruby-lsp/lib/ruby_lsp/requests/type_hierarchy_supertypes.rb#64 + sig { params(entry: ::RubyIndexer::Entry).returns(::LanguageServer::Protocol::Interface::TypeHierarchyItem) } + def hierarchy_item(entry); end +end + +# The [workspace symbol](https://microsoft.github.io/language-server-protocol/specification#workspace_symbol) +# request allows fuzzy searching declarations in the entire project. On VS Code, use CTRL/CMD + T to search for +# symbols. +# +# source://ruby-lsp/lib/ruby_lsp/requests/workspace_symbol.rb#9 +class RubyLsp::Requests::WorkspaceSymbol < ::RubyLsp::Requests::Request + include ::RubyLsp::Requests::Support::Common + + # source://ruby-lsp/lib/ruby_lsp/requests/workspace_symbol.rb#14 + sig { params(global_state: ::RubyLsp::GlobalState, query: T.nilable(::String)).void } + def initialize(global_state, query); end + + # source://ruby-lsp/lib/ruby_lsp/requests/workspace_symbol.rb#22 + sig { override.returns(T::Array[::LanguageServer::Protocol::Interface::WorkspaceSymbol]) } + def perform; end +end + +# source://ruby-lsp/lib/ruby_lsp/response_builders/response_builder.rb#5 +module RubyLsp::ResponseBuilders; end + +# source://ruby-lsp/lib/ruby_lsp/response_builders/collection_response_builder.rb#6 +class RubyLsp::ResponseBuilders::CollectionResponseBuilder < ::RubyLsp::ResponseBuilders::ResponseBuilder + extend T::Generic + + ResponseType = type_member { { upper: Object } } + + # source://ruby-lsp/lib/ruby_lsp/response_builders/collection_response_builder.rb#13 + sig { void } + def initialize; end + + # source://ruby-lsp/lib/ruby_lsp/response_builders/collection_response_builder.rb#19 + sig { params(item: ResponseType).void } + def <<(item); end + + # source://ruby-lsp/lib/ruby_lsp/response_builders/collection_response_builder.rb#24 + sig { override.returns(T::Array[ResponseType]) } + def response; end +end + +# source://ruby-lsp/lib/ruby_lsp/response_builders/document_symbol.rb#6 +class RubyLsp::ResponseBuilders::DocumentSymbol < ::RubyLsp::ResponseBuilders::ResponseBuilder + extend T::Generic + + ResponseType = type_member { { fixed: T::Array[::LanguageServer::Protocol::Interface::DocumentSymbol] } } + + # source://ruby-lsp/lib/ruby_lsp/response_builders/document_symbol.rb#24 + sig { void } + def initialize; end + + # @param symbol [Interface::DocumentSymbol] + # @return [void] + # + # source://sorbet-runtime/0.5.11647lib/types/private/methods/_methods.rb#257 + def <<(*args, **_arg1, &blk); end + + # source://ruby-lsp/lib/ruby_lsp/response_builders/document_symbol.rb#47 + sig do + returns(T.any(::LanguageServer::Protocol::Interface::DocumentSymbol, ::RubyLsp::ResponseBuilders::DocumentSymbol::SymbolHierarchyRoot)) + end + def last; end + + # source://ruby-lsp/lib/ruby_lsp/response_builders/document_symbol.rb#40 + sig { returns(T.nilable(::LanguageServer::Protocol::Interface::DocumentSymbol)) } + def pop; end + + # source://ruby-lsp/lib/ruby_lsp/response_builders/document_symbol.rb#33 + sig { params(symbol: ::LanguageServer::Protocol::Interface::DocumentSymbol).void } + def push(symbol); end + + # source://ruby-lsp/lib/ruby_lsp/response_builders/document_symbol.rb#52 + sig { override.returns(T::Array[::LanguageServer::Protocol::Interface::DocumentSymbol]) } + def response; end +end + +# source://ruby-lsp/lib/ruby_lsp/response_builders/document_symbol.rb#11 +class RubyLsp::ResponseBuilders::DocumentSymbol::SymbolHierarchyRoot + # source://ruby-lsp/lib/ruby_lsp/response_builders/document_symbol.rb#18 + sig { void } + def initialize; end + + # source://ruby-lsp/lib/ruby_lsp/response_builders/document_symbol.rb#15 + sig { returns(T::Array[::LanguageServer::Protocol::Interface::DocumentSymbol]) } + def children; end +end + +# source://ruby-lsp/lib/ruby_lsp/response_builders/hover.rb#6 +class RubyLsp::ResponseBuilders::Hover < ::RubyLsp::ResponseBuilders::ResponseBuilder + extend T::Generic + + ResponseType = type_member { { fixed: String } } + + # source://ruby-lsp/lib/ruby_lsp/response_builders/hover.rb#13 + sig { void } + def initialize; end + + # source://ruby-lsp/lib/ruby_lsp/response_builders/hover.rb#35 + sig { returns(T::Boolean) } + def empty?; end + + # source://ruby-lsp/lib/ruby_lsp/response_builders/hover.rb#27 + sig { params(content: ::String, category: ::Symbol).void } + def push(content, category:); end + + # source://ruby-lsp/lib/ruby_lsp/response_builders/hover.rb#40 + sig { override.returns(ResponseType) } + def response; end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://ruby-lsp/lib/ruby_lsp/response_builders/response_builder.rb#6 +class RubyLsp::ResponseBuilders::ResponseBuilder + abstract! + + # @abstract + # + # source://ruby-lsp/lib/ruby_lsp/response_builders/response_builder.rb#13 + sig { abstract.returns(T.anything) } + def response; end +end + +# source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#6 +class RubyLsp::ResponseBuilders::SemanticHighlighting < ::RubyLsp::ResponseBuilders::ResponseBuilder + extend T::Generic + + ResponseType = type_member { { fixed: LanguageServer::Protocol::Interface::SemanticTokens } } + + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#64 + sig do + params( + code_units_cache: T.any(::Prism::CodeUnitsCache, T.proc.params(arg0: ::Integer).returns(::Integer)) + ).void + end + def initialize(code_units_cache); end + + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#71 + sig { params(location: ::Prism::Location, type: ::Symbol, modifiers: T::Array[::Symbol]).void } + def add_token(location, type, modifiers = T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#96 + sig { returns(T.nilable(::RubyLsp::ResponseBuilders::SemanticHighlighting::SemanticToken)) } + def last; end + + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#87 + sig { params(location: ::Prism::Location).returns(T::Boolean) } + def last_token_matches?(location); end + + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#101 + sig { override.returns(T::Array[::RubyLsp::ResponseBuilders::SemanticHighlighting::SemanticToken]) } + def response; end +end + +# source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#105 +class RubyLsp::ResponseBuilders::SemanticHighlighting::SemanticToken + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#132 + sig do + params( + start_line: ::Integer, + start_code_unit_column: ::Integer, + length: ::Integer, + type: ::Integer, + modifier: T::Array[::Integer] + ).void + end + def initialize(start_line:, start_code_unit_column:, length:, type:, modifier:); end + + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#115 + sig { returns(::Integer) } + def length; end + + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#121 + sig { returns(T::Array[::Integer]) } + def modifier; end + + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#149 + sig { params(modifier_symbols: T::Array[::Symbol]).void } + def replace_modifier(modifier_symbols); end + + # @raise [UndefinedTokenType] + # + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#141 + sig { params(type_symbol: ::Symbol).void } + def replace_type(type_symbol); end + + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#112 + sig { returns(::Integer) } + def start_code_unit_column; end + + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#109 + sig { returns(::Integer) } + def start_line; end + + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#118 + sig { returns(::Integer) } + def type; end +end + +# source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#159 +class RubyLsp::ResponseBuilders::SemanticHighlighting::SemanticTokenEncoder + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#163 + sig { void } + def initialize; end + + # For more information on how each number is calculated, read: + # https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_semanticTokens + # + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#198 + sig { params(token: ::RubyLsp::ResponseBuilders::SemanticHighlighting::SemanticToken).returns(T::Array[::Integer]) } + def compute_delta(token); end + + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#173 + sig do + params( + tokens: T::Array[::RubyLsp::ResponseBuilders::SemanticHighlighting::SemanticToken] + ).returns(T::Array[::Integer]) + end + def encode(tokens); end + + # Encode an array of modifiers to positions onto a bit flag + # For example, [:default_library] will be encoded as + # 0b1000000000, as :default_library is the 10th bit according + # to the token modifiers index map. + # + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#220 + sig { params(modifiers: T::Array[::Integer]).returns(::Integer) } + def encode_modifiers(modifiers); end +end + +# source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#40 +RubyLsp::ResponseBuilders::SemanticHighlighting::TOKEN_MODIFIERS = T.let(T.unsafe(nil), Hash) + +# source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#11 +RubyLsp::ResponseBuilders::SemanticHighlighting::TOKEN_TYPES = T.let(T.unsafe(nil), Hash) + +# source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#7 +class RubyLsp::ResponseBuilders::SemanticHighlighting::UndefinedTokenType < ::StandardError; end + +# source://ruby-lsp/lib/ruby_lsp/response_builders/signature_help.rb#6 +class RubyLsp::ResponseBuilders::SignatureHelp < ::RubyLsp::ResponseBuilders::ResponseBuilder + extend T::Generic + + ResponseType = type_member { { fixed: T.nilable(::LanguageServer::Protocol::Interface::SignatureHelp) } } + + # source://ruby-lsp/lib/ruby_lsp/response_builders/signature_help.rb#12 + sig { void } + def initialize; end + + # source://ruby-lsp/lib/ruby_lsp/response_builders/signature_help.rb#18 + sig { params(signature_help: ResponseType).void } + def replace(signature_help); end + + # source://ruby-lsp/lib/ruby_lsp/response_builders/signature_help.rb#23 + sig { override.returns(ResponseType) } + def response; end +end + +# The final result of running a request before its IO is finalized +# +# source://ruby-lsp/lib/ruby_lsp/utils.rb#198 +class RubyLsp::Result + # source://ruby-lsp/lib/ruby_lsp/utils.rb#208 + sig { params(id: ::Integer, response: T.untyped).void } + def initialize(id:, response:); end + + # source://ruby-lsp/lib/ruby_lsp/utils.rb#205 + sig { returns(::Integer) } + def id; end + + # source://ruby-lsp/lib/ruby_lsp/utils.rb#202 + sig { returns(T.untyped) } + def response; end + + # source://ruby-lsp/lib/ruby_lsp/utils.rb#214 + sig { returns(T::Hash[::Symbol, T.untyped]) } + def to_hash; end +end + +# source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#5 +class RubyLsp::RubyDocument < ::RubyLsp::Document + extend T::Generic + + ParseResultType = type_member { { fixed: Prism::ParseResult } } + + # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#146 + sig { params(source: ::String, version: ::Integer, uri: ::URI::Generic, encoding: ::Encoding).void } + def initialize(source:, version:, uri:, encoding: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#143 + sig { returns(T.any(::Prism::CodeUnitsCache, T.proc.params(arg0: ::Integer).returns(::Integer))) } + def code_units_cache; end + + # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#170 + sig { override.returns(::RubyLsp::Document::LanguageId) } + def language_id; end + + # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#200 + sig do + params( + range: T::Hash[::Symbol, T.untyped], + node_types: T::Array[T.class_of(Prism::Node)] + ).returns(T.nilable(::Prism::Node)) + end + def locate_first_within_range(range, node_types: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#234 + sig do + params( + position: T::Hash[::Symbol, T.untyped], + node_types: T::Array[T.class_of(Prism::Node)] + ).returns(::RubyLsp::NodeContext) + end + def locate_node(position, node_types: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#155 + sig { override.returns(T::Boolean) } + def parse!; end + + # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#175 + sig { returns(::RubyLsp::RubyDocument::SorbetLevel) } + def sorbet_level; end + + # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#165 + sig { override.returns(T::Boolean) } + def syntax_error?; end + + class << self + # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#35 + sig do + params( + node: ::Prism::Node, + char_position: ::Integer, + code_units_cache: T.any(::Prism::CodeUnitsCache, T.proc.params(arg0: ::Integer).returns(::Integer)), + node_types: T::Array[T.class_of(Prism::Node)] + ).returns(::RubyLsp::NodeContext) + end + def locate(node, char_position, code_units_cache:, node_types: T.unsafe(nil)); end + end +end + +# source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#11 +class RubyLsp::RubyDocument::SorbetLevel < ::T::Enum + enums do + False = new + Ignore = new + None = new + Strict = new + True = new + end +end + +# The path to the `static_docs` directory, where we keep long-form static documentation +# +# source://ruby-lsp/lib/ruby_lsp/static_docs.rb#6 +RubyLsp::STATIC_DOCS_PATH = T.let(T.unsafe(nil), String) + +# source://ruby-lsp/lib/ruby_lsp/scope.rb#5 +class RubyLsp::Scope + # source://ruby-lsp/lib/ruby_lsp/scope.rb#12 + sig { params(parent: T.nilable(::RubyLsp::Scope)).void } + def initialize(parent = T.unsafe(nil)); end + + # Add a new local to this scope. The types should only be `:parameter` or `:variable` + # + # source://ruby-lsp/lib/ruby_lsp/scope.rb#21 + sig { params(name: T.any(::String, ::Symbol), type: ::Symbol).void } + def add(name, type); end + + # source://ruby-lsp/lib/ruby_lsp/scope.rb#26 + sig { params(name: T.any(::String, ::Symbol)).returns(T.nilable(::RubyLsp::Scope::Local)) } + def lookup(name); end + + # source://ruby-lsp/lib/ruby_lsp/scope.rb#9 + sig { returns(T.nilable(::RubyLsp::Scope)) } + def parent; end +end + +# source://ruby-lsp/lib/ruby_lsp/scope.rb#35 +class RubyLsp::Scope::Local + # source://ruby-lsp/lib/ruby_lsp/scope.rb#42 + sig { params(type: ::Symbol).void } + def initialize(type); end + + # source://ruby-lsp/lib/ruby_lsp/scope.rb#39 + sig { returns(::Symbol) } + def type; end +end + +# source://ruby-lsp/lib/ruby_lsp/server.rb#5 +class RubyLsp::Server < ::RubyLsp::BaseServer + # Only for testing + # + # source://ruby-lsp/lib/ruby_lsp/server.rb#10 + sig { returns(::RubyLsp::GlobalState) } + def global_state; end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#153 + sig { params(include_project_addons: T::Boolean).void } + def load_addons(include_project_addons: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#13 + sig { override.params(message: T::Hash[::Symbol, T.untyped]).void } + def process_message(message); end + + # Process responses to requests that were sent to the client + # + # source://ruby-lsp/lib/ruby_lsp/server.rb#145 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def process_response(message); end + + private + + # source://ruby-lsp/lib/ruby_lsp/server.rb#1127 + sig { params(id: ::String, title: ::String, percentage: ::Integer).void } + def begin_progress(id, title, percentage: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#1157 + sig { void } + def check_formatter_is_available; end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#813 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def code_action_resolve(message); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#1147 + sig { params(id: ::String).void } + def end_progress(id); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#1095 + sig { void } + def perform_initial_indexing; end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#1176 + sig { params(indexing_options: T.nilable(T::Hash[::Symbol, T.untyped])).void } + def process_indexing_configuration(indexing_options); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#1140 + sig { params(id: ::String, percentage: ::Integer).void } + def progress(id, percentage); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#456 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def run_combined_requests(message); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#193 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def run_initialize(message); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#337 + sig { void } + def run_initialized; end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#1090 + sig { override.void } + def shutdown; end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#749 + sig { params(document: RubyLsp::Document[T.untyped]).returns(::RubyLsp::RubyDocument::SorbetLevel) } + def sorbet_level(document); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#791 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def text_document_code_action(message); end + + # @param message [Hash{Symbol => T.untyped}] + # @return [void] + # + # source://sorbet-runtime/0.5.11647lib/types/private/methods/_methods.rb#257 + def text_document_code_lens(*args, **_arg1, &blk); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#878 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def text_document_completion(message); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#903 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def text_document_completion_item_resolve(message); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#948 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def text_document_definition(message); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#838 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def text_document_diagnostic(message); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#420 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def text_document_did_change(message); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#404 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def text_document_did_close(message); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#364 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def text_document_did_open(message); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#647 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def text_document_document_highlight(message); end + + # @param message [Hash{Symbol => T.untyped}] + # @return [void] + # + # source://sorbet-runtime/0.5.11647lib/types/private/methods/_methods.rb#257 + def text_document_document_link(*args, **_arg1, &blk); end + + # @param message [Hash{Symbol => T.untyped}] + # @return [void] + # + # source://sorbet-runtime/0.5.11647lib/types/private/methods/_methods.rb#257 + def text_document_document_symbol(*args, **_arg1, &blk); end + + # @param message [Hash{Symbol => T.untyped}] + # @return [void] + # + # source://sorbet-runtime/0.5.11647lib/types/private/methods/_methods.rb#257 + def text_document_folding_range(*args, **_arg1, &blk); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#603 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def text_document_formatting(message); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#686 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def text_document_hover(message); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#757 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def text_document_inlay_hint(message); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#663 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def text_document_on_type_formatting(message); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#1032 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def text_document_prepare_type_hierarchy(message); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#575 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def text_document_range_formatting(message); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#731 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def text_document_references(message); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#711 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def text_document_rename(message); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#430 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def text_document_selection_range(message); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#521 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def text_document_semantic_tokens_delta(message); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#500 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def text_document_semantic_tokens_full(message); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#546 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def text_document_semantic_tokens_range(message); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#1013 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def text_document_show_syntax_tree(message); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#922 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def text_document_signature_help(message); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#1060 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def type_hierarchy_subtypes(message); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#1051 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def type_hierarchy_supertypes(message); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#1217 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def window_show_message_request(message); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#1067 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def workspace_dependencies(message); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#973 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def workspace_did_change_watched_files(message); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#1000 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def workspace_symbol(message); end +end + +# source://ruby-lsp/lib/ruby_lsp/store.rb#5 +class RubyLsp::Store + # source://ruby-lsp/lib/ruby_lsp/store.rb#17 + sig { void } + def initialize; end + + # source://ruby-lsp/lib/ruby_lsp/store.rb#118 + sig do + type_parameters(:T) + .params( + uri: ::URI::Generic, + request_name: ::String, + block: T.proc.params(document: RubyLsp::Document[T.untyped]).returns(T.type_parameter(:T)) + ).returns(T.type_parameter(:T)) + end + def cache_fetch(uri, request_name, &block); end + + # source://ruby-lsp/lib/ruby_lsp/store.rb#84 + sig { void } + def clear; end + + # source://ruby-lsp/lib/ruby_lsp/store.rb#14 + sig { returns(::String) } + def client_name; end + + # @return [String] + # + # source://ruby-lsp/lib/ruby_lsp/store.rb#14 + def client_name=(_arg0); end + + # source://ruby-lsp/lib/ruby_lsp/store.rb#94 + sig { params(uri: ::URI::Generic).void } + def delete(uri); end + + # source://ruby-lsp/lib/ruby_lsp/store.rb#104 + sig { params(block: T.proc.params(uri: ::String, document: RubyLsp::Document[T.untyped]).void).void } + def each(&block); end + + # source://ruby-lsp/lib/ruby_lsp/store.rb#89 + sig { returns(T::Boolean) } + def empty?; end + + # source://ruby-lsp/lib/ruby_lsp/store.rb#11 + sig { returns(T::Hash[::Symbol, ::RubyLsp::RequestConfig]) } + def features_configuration; end + + # @return [Hash{Symbol => RequestConfig}] + # + # source://ruby-lsp/lib/ruby_lsp/store.rb#11 + def features_configuration=(_arg0); end + + # source://ruby-lsp/lib/ruby_lsp/store.rb#33 + sig { params(uri: ::URI::Generic).returns(RubyLsp::Document[T.untyped]) } + def get(uri); end + + # source://ruby-lsp/lib/ruby_lsp/store.rb#99 + sig { params(uri: ::URI::Generic).returns(T::Boolean) } + def key?(uri); end + + # source://ruby-lsp/lib/ruby_lsp/store.rb#79 + sig { params(uri: ::URI::Generic, edits: T::Array[T::Hash[::Symbol, T.untyped]], version: ::Integer).void } + def push_edits(uri:, edits:, version:); end + + # source://ruby-lsp/lib/ruby_lsp/store.rb#67 + sig do + params( + uri: ::URI::Generic, + source: ::String, + version: ::Integer, + language_id: ::RubyLsp::Document::LanguageId, + encoding: ::Encoding + ).returns(RubyLsp::Document[T.untyped]) + end + def set(uri:, source:, version:, language_id:, encoding: T.unsafe(nil)); end +end + +# source://ruby-lsp/lib/ruby_lsp/store.rb#8 +class RubyLsp::Store::NonExistingDocumentError < ::StandardError; end + +# source://ruby-lsp/lib/ruby_lsp/test_helper.rb#7 +module RubyLsp::TestHelper + # source://ruby-lsp/lib/ruby_lsp/test_helper.rb#20 + sig do + type_parameters(:T) + .params( + source: T.nilable(::String), + uri: ::URI::Generic, + stub_no_typechecker: T::Boolean, + load_addons: T::Boolean, + block: T.proc.params(server: ::RubyLsp::Server, uri: ::URI::Generic).returns(T.type_parameter(:T)) + ).returns(T.type_parameter(:T)) + end + def with_server(source = T.unsafe(nil), uri = T.unsafe(nil), stub_no_typechecker: T.unsafe(nil), load_addons: T.unsafe(nil), &block); end +end + +# source://ruby-lsp/lib/ruby_lsp/utils.rb#8 +RubyLsp::Transport = LanguageServer::Protocol::Transport + +# A minimalistic type checker to try to resolve types that can be inferred without requiring a type system or +# annotations +# +# source://ruby-lsp/lib/ruby_lsp/type_inferrer.rb#7 +class RubyLsp::TypeInferrer + # source://ruby-lsp/lib/ruby_lsp/type_inferrer.rb#11 + sig { params(index: ::RubyIndexer::Index).void } + def initialize(index); end + + # source://ruby-lsp/lib/ruby_lsp/type_inferrer.rb#16 + sig { params(node_context: ::RubyLsp::NodeContext).returns(T.nilable(::RubyLsp::TypeInferrer::Type)) } + def infer_receiver_type(node_context); end + + private + + # source://ruby-lsp/lib/ruby_lsp/type_inferrer.rb#139 + sig { params(node: T.any(::Prism::ConstantPathNode, ::Prism::ConstantReadNode)).returns(T.nilable(::String)) } + def constant_name(node); end + + # source://ruby-lsp/lib/ruby_lsp/type_inferrer.rb#32 + sig do + params( + node: ::Prism::CallNode, + node_context: ::RubyLsp::NodeContext + ).returns(T.nilable(::RubyLsp::TypeInferrer::Type)) + end + def infer_receiver_for_call_node(node, node_context); end + + # source://ruby-lsp/lib/ruby_lsp/type_inferrer.rb#115 + sig { params(node_context: ::RubyLsp::NodeContext).returns(::RubyLsp::TypeInferrer::Type) } + def self_receiver_handling(node_context); end +end + +# A type that was guessed based on the receiver raw name +# +# source://ruby-lsp/lib/ruby_lsp/type_inferrer.rb#160 +class RubyLsp::TypeInferrer::GuessedType < ::RubyLsp::TypeInferrer::Type; end + +# A known type +# +# source://ruby-lsp/lib/ruby_lsp/type_inferrer.rb#147 +class RubyLsp::TypeInferrer::Type + # source://ruby-lsp/lib/ruby_lsp/type_inferrer.rb#154 + sig { params(name: ::String).void } + def initialize(name); end + + # source://ruby-lsp/lib/ruby_lsp/type_inferrer.rb#151 + sig { returns(::String) } + def name; end +end + +# source://ruby-lsp/lib/ruby-lsp.rb#5 +RubyLsp::VERSION = T.let(T.unsafe(nil), String) + +# source://ruby-lsp/lib/core_ext/uri.rb#5 +class URI::Generic + include ::URI::RFC2396_REGEXP +end + +# Avoid a deprecation warning with Ruby 3.4 where the default parser was changed to RFC3986. +# This condition must remain even after support for 3.4 has been dropped for users that have +# `uri` in their lockfile, decoupling it from the ruby version. +# +# source://ruby-lsp/lib/core_ext/uri.rb#11 +URI::Generic::PARSER = T.let(T.unsafe(nil), URI::RFC2396_Parser) + +# Must be kept in sync with the one in Tapioca +# +# source://ruby-lsp/lib/ruby_lsp/requests/support/source_uri.rb#8 +class URI::Source < ::URI::File + # source://ruby-lsp/lib/ruby_lsp/requests/support/source_uri.rb#69 + sig { params(v: T.nilable(::String)).returns(T::Boolean) } + def check_host(v); end + + # source://uri/0.13.0lib/uri/generic.rb#243 + def gem_name; end + + # source://ruby-lsp/lib/ruby_lsp/requests/support/source_uri.rb#33 + sig { returns(T.nilable(::String)) } + def gem_version; end + + # source://uri/0.13.0lib/uri/generic.rb#283 + def line_number; end + + # source://ruby-lsp/lib/ruby_lsp/requests/support/source_uri.rb#59 + sig { params(v: T.nilable(::String)).void } + def set_path(v); end + + # source://ruby-lsp/lib/ruby_lsp/requests/support/source_uri.rb#81 + sig { returns(::String) } + def to_s; end + + class << self + # source://ruby-lsp/lib/ruby_lsp/requests/support/source_uri.rb#46 + sig do + params( + gem_name: ::String, + gem_version: T.nilable(::String), + path: ::String, + line_number: T.nilable(::String) + ).returns(::URI::Source) + end + def build(gem_name:, gem_version:, path:, line_number:); end + end +end + +# source://ruby-lsp/lib/ruby_lsp/requests/support/source_uri.rb#11 +URI::Source::COMPONENT = T.let(T.unsafe(nil), Array) + +# `uri` for Ruby 3.4 switched the default parser from RFC2396 to RFC3986. The new parser emits a deprecation +# warning on a few methods and delegates them to RFC2396, namely `extract`/`make_regexp`/`escape`/`unescape`. +# On earlier versions of the uri gem, the RFC2396_PARSER constant doesn't exist, so it needs some special +# handling to select a parser that doesn't emit deprecations. While it was backported to Ruby 3.1, users may +# have the uri gem in their own bundle and thus not use a compatible version. +# +# source://ruby-lsp/lib/ruby_lsp/requests/support/source_uri.rb#27 +URI::Source::PARSER = T.let(T.unsafe(nil), URI::RFC2396_Parser) From 6c57bbf398a52df04baf44c3494bd98d0a3d9823 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Thu, 3 Oct 2024 11:32:58 -0400 Subject: [PATCH 4/6] Prevent re-definition error for source URI --- lib/tapioca/helpers/source_uri.rb | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/tapioca/helpers/source_uri.rb b/lib/tapioca/helpers/source_uri.rb index e2a9726f6..4846829d6 100644 --- a/lib/tapioca/helpers/source_uri.rb +++ b/lib/tapioca/helpers/source_uri.rb @@ -25,9 +25,6 @@ class Source < URI::File # have the uri gem in their own bundle and thus not use a compatible version. PARSER = T.let(const_defined?(:RFC2396_PARSER) ? RFC2396_PARSER : DEFAULT_PARSER, RFC2396_Parser) - alias_method(:gem_name, :host) - alias_method(:line_number, :fragment) - sig { returns(T.nilable(String)) } attr_reader :gem_version @@ -54,6 +51,16 @@ def build(gem_name:, gem_version:, path:, line_number:) end end + sig { returns(T.nilable(String)) } + def gem_name + host + end + + sig { returns(T.nilable(String)) } + def line_number + fragment + end + sig { params(v: T.nilable(String)).void } def set_path(v) # rubocop:disable Naming/AccessorMethodName return if v.nil? From 0bda321d1863f7c04327220f40f45fa643569f61 Mon Sep 17 00:00:00 2001 From: Kaan Ozkan Date: Fri, 22 Nov 2024 15:10:01 -0500 Subject: [PATCH 5/6] Add add-on boiler plate Co-authored-by: Vinicius Stock Co-authored-by: Andy Waite --- lib/ruby_lsp/tapioca/addon.rb | 70 +++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 lib/ruby_lsp/tapioca/addon.rb diff --git a/lib/ruby_lsp/tapioca/addon.rb b/lib/ruby_lsp/tapioca/addon.rb new file mode 100644 index 000000000..e8f13507c --- /dev/null +++ b/lib/ruby_lsp/tapioca/addon.rb @@ -0,0 +1,70 @@ +# typed: strict +# frozen_string_literal: true + +RubyLsp::Addon.depend_on_ruby_lsp!(">= 0.22.1", "< 0.23") + +begin + # The Tapioca add-on depends on the Rails add-on to add a runtime component to the runtime server. We can allow the + # add-on to work outside of a Rails context in the future, but that may require Tapioca spawning its own runtime + # server + require "ruby_lsp/ruby_lsp_rails/runner_client" +rescue LoadError + return +end + +module RubyLsp + module Tapioca + class Addon < ::RubyLsp::Addon + extend T::Sig + + sig { void } + def initialize + super + + @global_state = T.let(nil, T.nilable(RubyLsp::GlobalState)) + @rails_runner_client = T.let(nil, T.nilable(RubyLsp::Rails::RunnerClient)) + end + + sig { override.params(global_state: RubyLsp::GlobalState, outgoing_queue: Thread::Queue).void } + def activate(global_state, outgoing_queue) + @global_state = global_state + return unless @global_state.enabled_feature?(:tapiocaAddon) + + Thread.new do + # Get a handle to the Rails add-on's runtime client. The call to `rails_runner_client` will block this thread + # until the server has finished booting, but it will not block the main LSP. This has to happen inside of a + # thread + addon = T.cast(::RubyLsp::Addon.get("Ruby LSP Rails", ">= 0.3.17", "< 0.4"), ::RubyLsp::Rails::Addon) + @rails_runner_client = addon.rails_runner_client + outgoing_queue << Notification.window_log_message("Activating Tapioca add-on v#{version}") + @rails_runner_client.register_server_addon(File.expand_path("server_addon.rb", __dir__)) + rescue IncompatibleApiError + # The requested version for the Rails add-on no longer matches. We need to upgrade and fix the breaking + # changes + end + end + + sig { override.void } + def deactivate + end + + sig { override.returns(String) } + def name + "Tapioca" + end + + sig { override.returns(String) } + def version + "0.1.0" + end + + sig { params(changes: T::Array[{ uri: String, type: Integer }]).void } + def workspace_did_change_watched_files(changes) + return unless T.must(@global_state).enabled_feature?(:tapiocaAddon) + return unless @rails_runner_client # Client is not ready + + nil + end + end + end +end From 0bb1961d2c78dcad6b2ef282271079100c8175c1 Mon Sep 17 00:00:00 2001 From: Kaan Ozkan Date: Fri, 22 Nov 2024 15:24:11 -0500 Subject: [PATCH 6/6] Add ServerAddon boilerplate --- .rubocop.yml | 2 + lib/ruby_lsp/tapioca/server_addon.rb | 26 +++++ sorbet/rbi/gems/ruby-lsp-rails@0.3.27.rbi | 118 ++++++++++++++++++++++ sorbet/tapioca/require.rb | 1 + 4 files changed, 147 insertions(+) create mode 100644 lib/ruby_lsp/tapioca/server_addon.rb diff --git a/.rubocop.yml b/.rubocop.yml index ce305bbc1..116e90678 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -45,6 +45,8 @@ Sorbet/TrueSigil: Include: - "**/*.rb" - "**/*.rake" + Exclude: + - "lib/ruby_lsp/tapioca/server_addon.rb" Style/CaseEquality: Enabled: false diff --git a/lib/ruby_lsp/tapioca/server_addon.rb b/lib/ruby_lsp/tapioca/server_addon.rb new file mode 100644 index 000000000..ba49ed12e --- /dev/null +++ b/lib/ruby_lsp/tapioca/server_addon.rb @@ -0,0 +1,26 @@ +# typed: false +# frozen_string_literal: true + +require "tapioca/internal" + +module RubyLsp + module Tapioca + class ServerAddon < ::RubyLsp::Rails::ServerAddon + def name + "Tapioca" + end + + def execute(request, params) + case request + when "dsl" + dsl(params) + end + end + + private + + def dsl(params) + end + end + end +end diff --git a/sorbet/rbi/gems/ruby-lsp-rails@0.3.27.rbi b/sorbet/rbi/gems/ruby-lsp-rails@0.3.27.rbi index 680d69964..c4f7c4a95 100644 --- a/sorbet/rbi/gems/ruby-lsp-rails@0.3.27.rbi +++ b/sorbet/rbi/gems/ruby-lsp-rails@0.3.27.rbi @@ -277,6 +277,42 @@ class RubyLsp::Rails::CodeLens def test_command; end end +# source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#12 +module RubyLsp::Rails::Common + # Log a message to the editor's output panel + # + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#20 + def log_message(message); end + + # Sends an error result to a request, if the request failed. DO NOT INVOKE THIS METHOD FOR NOTIFICATIONS! Use + # `log_message` instead, otherwise the client/server communication will go out of sync + # + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#26 + def send_error_response(message); end + + # Write a message to the client. Can be used for sending notifications to the editor + # + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#14 + def send_message(message); end + + # Sends a result back to the client + # + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#31 + def send_result(result); end + + # Handle possible errors for a notification. This should only be used for notifications, which means messages that + # do not return a response back to the client. Errors are logged to the editor's output panel + # + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#50 + def with_notification_error_handling(notification_name, &block); end + + # Handle possible errors for a request. This should only be used for requests, which means messages that return a + # response back to the client. Errors are returned as an error object back to the client + # + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#37 + def with_request_error_handling(request_name, &block); end +end + # ![Definition demo](../../definition.gif) # # The [definition @@ -645,6 +681,88 @@ class RubyLsp::Rails::RunnerClient::InitializationError < ::StandardError; end # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#46 class RubyLsp::Rails::RunnerClient::MessageError < ::StandardError; end +# source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#103 +class RubyLsp::Rails::Server + include ::RubyLsp::Rails::Common + + # @return [Server] a new instance of Server + # + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#106 + def initialize(stdout: T.unsafe(nil), override_default_output_device: T.unsafe(nil)); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#139 + def execute(request, params); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#126 + def start; end + + private + + # @return [Boolean] + # + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#267 + def active_record_model?(const); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#298 + def load_routes; end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#277 + def pending_migrations_message; end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#255 + def resolve_association_target(params); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#239 + def resolve_database_info_from_model(model_name); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#188 + def resolve_route_info(requirements); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#234 + def route_location(name); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#287 + def run_migrations; end +end + +# source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#62 +class RubyLsp::Rails::ServerAddon + include ::RubyLsp::Rails::Common + + # @return [ServerAddon] a new instance of ServerAddon + # + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#90 + def initialize(stdout); end + + # @raise [NotImplementedError] + # + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#98 + def execute(request, params); end + + # @raise [NotImplementedError] + # + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#94 + def name; end + + class << self + # Delegate `request` with `params` to the server add-on with the given `name` + # + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#77 + def delegate(name, request, params); end + + # Instantiate all server addons and store them in a hash for easy access after we have discovered the classes + # + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#82 + def finalize_registrations!(stdout); end + + # We keep track of runtime server add-ons the same way we track other add-ons, by storing classes that inherit + # from the base one + # + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#71 + def inherited(child); end + end +end + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/support/associations.rb#6 module RubyLsp::Rails::Support; end diff --git a/sorbet/tapioca/require.rb b/sorbet/tapioca/require.rb index f6370f731..d9cde40b4 100644 --- a/sorbet/tapioca/require.rb +++ b/sorbet/tapioca/require.rb @@ -15,4 +15,5 @@ require "ruby_lsp/internal" require "ruby_lsp/test_helper" require "ruby_lsp/ruby_lsp_rails/addon" +require "ruby_lsp/ruby_lsp_rails/server" require "rbs"