# typed: true

# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `rubydex` gem.
# Please instead update this file by running `bin/tapioca gem rubydex`.


# frozen_string_literal: true
# typed: strict

module Rubydex; end
class Rubydex::AliasCycleError < ::Rubydex::Error; end
class Rubydex::AttrAccessorDefinition < ::Rubydex::Definition; end
class Rubydex::AttrReaderDefinition < ::Rubydex::Definition; end
class Rubydex::AttrWriterDefinition < ::Rubydex::Definition; end

class Rubydex::Class < ::Rubydex::Namespace
  include ::Rubydex::Visibility

  def visibility; end
end

class Rubydex::ClassDefinition < ::Rubydex::Definition
  sig { returns(T::Array[Rubydex::Mixin]) }
  def mixins; end

  sig { returns(T.nilable(Rubydex::ConstantReference)) }
  def superclass; end
end

class Rubydex::ClassVariable < ::Rubydex::Declaration
  sig { returns(T::Array[T.untyped]) }
  def references; end
end

class Rubydex::ClassVariableDefinition < ::Rubydex::Definition; end

class Rubydex::Comment
  sig { params(string: String, location: Rubydex::Location).void }
  def initialize(string:, location:); end

  sig { returns(Rubydex::Location) }
  def location; end

  sig { returns(String) }
  def string; end
end

class Rubydex::ConfigError < ::Rubydex::Error; end

class Rubydex::Constant < ::Rubydex::Declaration
  include ::Rubydex::Visibility

  sig { returns(T::Enumerable[Rubydex::ConstantReference]) }
  def references; end

  def visibility; end
end

class Rubydex::ConstantAlias < ::Rubydex::Declaration
  include ::Rubydex::Visibility

  sig { returns(T::Enumerable[Rubydex::ConstantReference]) }
  def references; end

  sig { returns(T.nilable(Rubydex::Declaration)) }
  def target; end

  def visibility; end
end

class Rubydex::ConstantAliasDefinition < ::Rubydex::Definition; end
class Rubydex::ConstantDefinition < ::Rubydex::Definition; end

class Rubydex::ConstantReference < ::Rubydex::Reference
  abstract!

  def initialize(_arg0, _arg1); end

  sig { returns(Rubydex::Document) }
  def document; end

  sig { returns(Rubydex::Location) }
  def location; end

  class << self
    def new(*args); end
  end
end

class Rubydex::ConstantVisibilityDefinition < ::Rubydex::Definition; end

class Rubydex::Declaration
  abstract!

  def initialize(_arg0, _arg1); end

  sig { returns(T::Enumerable[Rubydex::Definition]) }
  def definitions; end

  sig { returns(String) }
  def name; end

  sig { returns(Rubydex::Declaration) }
  def owner; end

  sig { returns(T::Enumerable[Rubydex::Reference]) }
  def references; end

  sig { returns(String) }
  def unqualified_name; end

  class << self
    private

    def new(*_arg0); end
  end
end

class Rubydex::Definition
  abstract!

  def initialize(_arg0, _arg1); end

  sig { returns(T::Array[Rubydex::Comment]) }
  def comments; end

  sig { returns(T.nilable(Rubydex::Declaration)) }
  def declaration; end

  sig { returns(T::Boolean) }
  def deprecated?; end

  sig { returns(Rubydex::Document) }
  def document; end

  sig { returns(T::Array[Rubydex::Definition]) }
  def lexical_nesting; end

  sig { returns(T.nilable(Rubydex::Definition)) }
  def lexical_owner; end

  sig { returns(Rubydex::Location) }
  def location; end

  sig { returns(String) }
  def name; end

  sig { returns(T.nilable(Rubydex::Location)) }
  def name_location; end

  class << self
    private

    def new(*_arg0); end
  end
end

class Rubydex::Diagnostic
  sig { params(rule: Symbol, message: String, location: Rubydex::Location).void }
  def initialize(rule:, message:, location:); end

  sig { returns(Rubydex::Location) }
  def location; end

  sig { returns(String) }
  def message; end

  sig { returns(Symbol) }
  def rule; end
end

class Rubydex::DisplayLocation < ::Rubydex::Location
  sig { returns([String, Integer, Integer, Integer, Integer]) }
  def comparable_values; end

  sig { returns(Rubydex::DisplayLocation) }
  def to_display; end

  sig { returns(String) }
  def to_s; end

  class << self
    sig { params(prism_location: Prism::Location, uri: String).returns(T.noreturn) }
    def from_prism(prism_location, uri:); end
  end
end

class Rubydex::Document
  def initialize(_arg0, _arg1); end

  sig { returns(T::Enumerable[Rubydex::Definition]) }
  def definitions; end

  sig { returns(T::Enumerable[Rubydex::MethodReference]) }
  def method_references; end

  sig { returns(String) }
  def uri; end

  class << self
    private

    def new(*_arg0); end
  end
end

class Rubydex::Error < ::StandardError; end
class Rubydex::Extend < ::Rubydex::Mixin; end

class Rubydex::Failure
  sig { params(message: String).void }
  def initialize(message); end

  sig { returns(String) }
  def message; end
end

class Rubydex::GlobalVariable < ::Rubydex::Declaration
  sig { returns(T::Array[T.untyped]) }
  def references; end
end

class Rubydex::GlobalVariableAliasDefinition < ::Rubydex::Definition; end
class Rubydex::GlobalVariableDefinition < ::Rubydex::Definition; end

class Rubydex::Graph
  sig { params(workspace_path: T.nilable(String)).void }
  def initialize(workspace_path: nil); end

  sig { params(fully_qualified_name: String).returns(T.nilable(Rubydex::Declaration)) }
  def [](fully_qualified_name); end

  sig { returns(T::Array[Rubydex::Failure]) }
  def check_integrity; end

  def complete_expression(*_arg0); end
  def complete_method_argument(*_arg0); end
  def complete_method_call(*_arg0); end
  def complete_namespace_access(*_arg0); end

  sig { returns(T::Enumerable[Rubydex::ConstantReference]) }
  def constant_references; end

  sig { returns(T::Enumerable[Rubydex::Declaration]) }
  def declarations; end

  sig { params(uri: String).returns(T.nilable(Rubydex::Document)) }
  def delete_document(uri); end

  sig { returns(T::Array[Rubydex::Diagnostic]) }
  def diagnostics; end

  sig { params(uri: String).returns(T.nilable(Rubydex::Document)) }
  def document(uri); end

  sig { returns(T::Enumerable[Rubydex::Document]) }
  def documents; end

  sig { params(encoding: String).void }
  def encoding=(encoding); end

  sig { params(patterns: T::Array[String]).void }
  def exclude_patterns(patterns); end

  sig { returns(T::Array[String]) }
  def excluded_patterns; end

  sig { params(queries: String).returns(T::Enumerable[Rubydex::Declaration]) }
  def fuzzy_search(*queries); end

  sig { params(file_paths: T::Array[String]).returns(T::Array[String]) }
  def index_all(file_paths); end

  sig { params(uri: String, source: String, language_id: String).void }
  def index_source(uri, source, language_id); end

  # Index all files and dependencies of the workspace that exists in `workspace_path`
  sig { returns(T::Array[String]) }
  def index_workspace; end

  def keyword(_arg0); end

  # Loads configuration, merging its exclusion patterns into the graph's configuration (the workspace path is never
  # overridden). With `config_path` (resolved relative to the workspace path), an explicitly named file that does not
  # exist raises `Rubydex::ConfigError`. With no argument, the default `.rubydex` is loaded if present and ignored if
  # missing. Raises `Rubydex::ConfigError` if a file cannot be read or is malformed.
  sig { params(config_path: T.nilable(String)).void }
  def load_config(config_path = nil); end

  sig { returns(T::Enumerable[Rubydex::MethodReference]) }
  def method_references; end

  sig { params(load_paths: T::Array[String]).returns(T::Array[String]) }
  def require_paths(load_paths); end

  sig { returns(T.self_type) }
  def resolve; end

  sig { params(name: String, nesting: T::Array[String]).returns(T.nilable(Rubydex::Declaration)) }
  def resolve_constant(name, nesting); end

  sig { params(require_path: String, load_paths: T::Array[String]).returns(T.nilable(Rubydex::Document)) }
  def resolve_require_path(require_path, load_paths); end

  sig { params(queries: String).returns(T::Enumerable[Rubydex::Declaration]) }
  def search(*queries); end

  sig { returns(String) }
  def workspace_path; end

  sig { params(workspace_path: String).returns(String) }
  def workspace_path=(workspace_path); end

  sig { returns(T::Array[String]) }
  def workspace_paths; end

  private

  sig { params(paths: T::Array[String]).void }
  def add_core_rbs_definition_paths(paths); end

  sig { params(paths: T::Array[String]).void }
  def add_workspace_dependency_paths(paths); end

  def initialize_clone(_arg0); end
  def initialize_copy(_arg0); end
end

Rubydex::Graph::INDEXABLE_EXTENSIONS = T.let(T.unsafe(nil), Array)
class Rubydex::Include < ::Rubydex::Mixin; end

class Rubydex::InstanceVariable < ::Rubydex::Declaration
  sig { returns(T::Array[T.untyped]) }
  def references; end
end

class Rubydex::InstanceVariableDefinition < ::Rubydex::Definition; end
class Rubydex::IntegrityFailure < ::Rubydex::Failure; end

class Rubydex::Keyword
  sig { params(name: String, documentation: String).void }
  def initialize(name, documentation); end

  sig { returns(String) }
  def documentation; end

  sig { returns(String) }
  def name; end
end

class Rubydex::KeywordParameter
  sig { params(name: String).void }
  def initialize(name); end

  sig { returns(String) }
  def name; end
end

class Rubydex::Location
  include ::Comparable

  sig { params(uri: String, start_line: Integer, end_line: Integer, start_column: Integer, end_column: Integer).void }
  def initialize(uri:, start_line:, end_line:, start_column:, end_column:); end

  sig { params(other: T.untyped).returns(T.nilable(Integer)) }
  def <=>(other); end

  sig { returns([String, Integer, Integer, Integer, Integer]) }
  def comparable_values; end

  sig { returns(Integer) }
  def end_column; end

  sig { returns(Integer) }
  def end_line; end

  sig { returns(Integer) }
  def start_column; end

  sig { returns(Integer) }
  def start_line; end

  sig { returns(Rubydex::DisplayLocation) }
  def to_display; end

  sig { returns(String) }
  def to_file_path; end

  sig { returns(String) }
  def to_s; end

  sig { returns(String) }
  def uri; end

  class << self
    sig { params(prism_location: Prism::Location, uri: String).returns(Rubydex::Location) }
    def from_prism(prism_location, uri:); end
  end
end

class Rubydex::Location::NotFileUriError < ::StandardError; end

class Rubydex::Method < ::Rubydex::Declaration
  include ::Rubydex::Visibility

  sig { returns(T::Enumerable[Rubydex::MethodReference]) }
  def references; end

  def visibility; end
end

class Rubydex::MethodAliasDefinition < ::Rubydex::Definition
  def signatures; end

  sig { returns(T.nilable(Rubydex::Method)) }
  def target; end
end

class Rubydex::MethodDefinition < ::Rubydex::Definition
  def signatures; end
end

class Rubydex::MethodReference < ::Rubydex::Reference
  def initialize(_arg0, _arg1); end

  sig { returns(Rubydex::Document) }
  def document; end

  sig { returns(Rubydex::Location) }
  def location; end

  sig { returns(String) }
  def name; end

  sig { returns(T.nilable(Rubydex::Declaration)) }
  def receiver; end
end

class Rubydex::MethodVisibilityDefinition < ::Rubydex::Definition; end

class Rubydex::Mixin
  abstract!

  sig { params(constant_reference: Rubydex::ConstantReference).void }
  def initialize(constant_reference); end

  def constant_reference; end
end

class Rubydex::Module < ::Rubydex::Namespace
  include ::Rubydex::Visibility

  def visibility; end
end

class Rubydex::ModuleDefinition < ::Rubydex::Definition
  sig { returns(T::Array[Rubydex::Mixin]) }
  def mixins; end
end

class Rubydex::Namespace < ::Rubydex::Declaration
  abstract!

  sig { returns(T::Enumerable[Rubydex::Namespace]) }
  def ancestors; end

  sig { returns(T::Enumerable[Rubydex::Namespace]) }
  def descendants; end

  def find_member(*_arg0); end

  sig { params(ancestor_names: String).returns(T::Boolean) }
  def has_ancestor?(*ancestor_names); end

  sig { params(name: String).returns(T.nilable(Rubydex::Declaration)) }
  def member(name); end

  sig { returns(T::Enumerable[Rubydex::Declaration]) }
  def members; end

  sig { returns(T::Enumerable[Rubydex::ConstantReference]) }
  def references; end

  sig { returns(T.nilable(Rubydex::SingletonClass)) }
  def singleton_class; end
end

class Rubydex::Prepend < ::Rubydex::Mixin; end

class Rubydex::Query
  def render(*_arg0); end

  class << self
    sig { params(query: String).returns(Rubydex::Query) }
    def parse(query); end

    sig { params(format: T.any(String, Symbol)).returns(String) }
    def schema(format = :table); end
  end
end

class Rubydex::Reference
  abstract!

  def initialize(_arg0, _arg1); end

  def location; end

  class << self
    private

    def new(*_arg0); end
  end
end

class Rubydex::ResolvedConstantReference < ::Rubydex::ConstantReference
  sig { returns(Rubydex::Declaration) }
  def declaration; end
end

class Rubydex::Signature
  def initialize(parameters); end

  def block_parameter; end
  def deconstruct; end
  def deconstruct_keys(keys); end
  def forward_parameter; end
  def keyword_parameters; end
  def optional_keyword_parameters; end
  def optional_positional_parameters; end
  def parameters; end
  def positional_parameters; end
  def post_parameters; end
  def rest_keyword_parameter; end
  def rest_positional_parameter; end
end

class Rubydex::Signature::BlockParameter < ::Rubydex::Signature::Parameter; end
Rubydex::Signature::DECONSTRUCT_KEYS = T.let(T.unsafe(nil), Array)
class Rubydex::Signature::ForwardParameter < ::Rubydex::Signature::Parameter; end
class Rubydex::Signature::KeywordParameter < ::Rubydex::Signature::Parameter; end
class Rubydex::Signature::OptionalKeywordParameter < ::Rubydex::Signature::Parameter; end
class Rubydex::Signature::OptionalPositionalParameter < ::Rubydex::Signature::Parameter; end

class Rubydex::Signature::Parameter
  def initialize(name, location); end

  def location; end
  def name; end
end

class Rubydex::Signature::PositionalParameter < ::Rubydex::Signature::Parameter; end
class Rubydex::Signature::PostParameter < ::Rubydex::Signature::Parameter; end
class Rubydex::Signature::RestKeywordParameter < ::Rubydex::Signature::Parameter; end
class Rubydex::Signature::RestPositionalParameter < ::Rubydex::Signature::Parameter; end

class Rubydex::SingletonClass < ::Rubydex::Namespace
  sig { returns(Rubydex::Declaration) }
  def attached_class; end
end

class Rubydex::SingletonClassDefinition < ::Rubydex::Definition
  sig { returns(T::Array[Rubydex::Mixin]) }
  def mixins; end
end

class Rubydex::Todo < ::Rubydex::Namespace; end

class Rubydex::UnresolvedConstantReference < ::Rubydex::ConstantReference
  sig { returns(String) }
  def name; end
end

Rubydex::VERSION = T.let(T.unsafe(nil), String)

module Rubydex::Visibility
  def private?; end
  def protected?; end
  def public?; end
end
