module RBS class Environment type module_decl = AST::Declarations::Class | AST::Declarations::Module interface _WithContext def outer: () -> Array[module_decl] def decl: () -> module_decl end module ContextUtil : _WithContext def context: () -> Array[Namespace] end class MultiEntry class D[M] attr_reader decl: M attr_reader outer: Array[module_decl] def initialize: (decl: module_decl, outer: Array[module_decl]) -> void include ContextUtil end attr_reader name: TypeName attr_reader decls: Array[D[module_decl]] def initialize: (name: TypeName) -> void def insert: (decl: module_decl, outer: Array[module_decl]) -> void def validate_type_params: () -> void def type_params: () -> AST::Declarations::ModuleTypeParams def primary: () -> D[module_decl] end class ModuleEntry < MultiEntry attr_reader decls: Array[MultiEntry::D[AST::Declarations::Module]] attr_reader primary: MultiEntry::D[AST::Declarations::Module] def self_types: () -> Array[AST::Declarations::Module::Self] end class ClassEntry < MultiEntry attr_reader decls: Array[MultiEntry::D[AST::Declarations::Class]] attr_reader primary: MultiEntry::D[AST::Declarations::Class] end class SingleEntry[N, D] include ContextUtil attr_reader name: N attr_reader decl: D attr_reader outer: Array[module_decl] def initialize: (name: N, decl: D, outer: Array[module_decl]) -> void end attr_reader buffers: Array[Buffer] attr_reader declarations: Array[AST::Declarations::t] attr_reader class_decls: Hash[TypeName, ModuleEntry | ClassEntry] attr_reader interface_decls: Hash[TypeName, SingleEntry[TypeName, AST::Declarations::Interface]] attr_reader alias_decls: Hash[TypeName, SingleEntry[TypeName, AST::Declarations::Alias]] attr_reader constant_decls: Hash[TypeName, SingleEntry[TypeName, AST::Declarations::Constant]] attr_reader global_decls: Hash[Symbol, SingleEntry[Symbol, AST::Declarations::Global]] def initialize: () -> void def initialize_copy: (Environment) -> void def self.from_loader: (EnvironmentLoader) -> Environment def cache_name: [Key, D] (Hash[Key, SingleEntry[Key, D]] cache, name: Key, decl: D, outer: Array[module_decl]) -> SingleEntry[Key, D] def insert_decl: (AST::Declarations::t, outer: Array[module_decl], namespace: Namespace) -> void def <<: (AST::Declarations::t decl) -> self def resolve_type_names: () -> Environment def resolve_declaration: (TypeNameResolver resolver, AST::Declarations::t decl, outer: Array[module_decl], prefix: Namespace) -> AST::Declarations::t def resolve_member: (TypeNameResolver, AST::Members::t, context: Array[Namespace]) -> AST::Members::t def absolute_type: (TypeNameResolver, Types::t, context: Array[Namespace]) -> Types::t def absolute_type_name: (TypeNameResolver, TypeName, context: Array[Namespace]) -> TypeName def inspect: () -> String end end