# typed: true

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


module RequireHooks
  class << self
    def around_load(patterns: T.unsafe(nil), exclude_patterns: T.unsafe(nil), &block); end
    def context_for(path); end
    def contexts; end
    def hijack_load(patterns: T.unsafe(nil), exclude_patterns: T.unsafe(nil), &block); end
    def print_warnings; end
    def print_warnings=(_arg0); end
    def setup_path_coverage(path, contents = T.unsafe(nil)); end
    def source_transform(patterns: T.unsafe(nil), exclude_patterns: T.unsafe(nil), &block); end

    private

    def eval_coverage_enabled?; end
    def register_hook(type, block, patterns: T.unsafe(nil), exclude_patterns: T.unsafe(nil)); end
  end
end

class RequireHooks::Context
  def initialize(patterns: T.unsafe(nil), exclude_patterns: T.unsafe(nil)); end

  def around_load; end
  def empty?; end
  def exclude_patterns; end
  def hijack?; end
  def hijack_load; end
  def match?(path); end
  def merge!(another_ctx); end
  def patterns; end
  def perform_source_transform(path); end
  def readonly?; end
  def run_around_load_callbacks(path); end
  def source_transform; end
  def source_transform?; end
  def to_key; end
  def try_hijack_load(path, source); end
end

RequireHooks::EMPTY_ISEQ = T.let(T.unsafe(nil), RubyVM::InstructionSequence)

module RequireHooks::Iseq
  class << self
    def compile_with_coverage(ctx, path); end
  end
end

module RequireHooks::LoadIseq
  def load_iseq(path); end
end

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

class RubyVM::InstructionSequence
  extend ::RequireHooks::LoadIseq
end
