Sha256: abc2c4b039ea3b5821abaf0948a11dd4351833959dddb2459c8571ba0ee4c243

Contents?: true

Size: 1.56 KB

Versions: 31

Compression:

Stored size: 1.56 KB

Contents

module RBS
  # TypeAliasDependency calculates the dependnecies between type aliases
  #
  # The dependencies are normalized automatically.
  #
  class TypeAliasDependency
    attr_reader env: Environment

    # A hash table from type alias name to it's direct dependencies
    #
    # The source type name and dependencies are normalized.
    #
    attr_reader direct_dependencies: Hash[TypeName, Set[TypeName]]

    # A hash table from type alias name to a hash name with keys of transitive dependnecies
    #
    # The source type name and dependencies are normalized.
    #
    attr_reader dependencies: Hash[TypeName, Hash[TypeName, bool]]

    def initialize: (env: Environment) -> void

    # Returns `true` if given type alias is circular
    #
    # Normalized given type name automatically.
    #
    def circular_definition?: (TypeName alias_name) -> bool

    # Returns the set of direct dependencies from the given type name
    #
    # Given type name will be normalized automatically.
    # Returns normalized type names.
    #
    def direct_dependencies_of: (TypeName) -> Set[TypeName]

    # Returns the set of dependencies from the given type name
    #
    # Given type name will be normalized automatically.
    # Returns normalized type names.
    #
    def dependencies_of: (TypeName) -> Set[TypeName]

    def build_dependencies: () -> void

    def transitive_closure: () -> void

    private

    def direct_dependency: (Types::t `type`, ?Set[TypeName] result) -> Set[TypeName]

    def dependency: (TypeName start, TypeName vertex, ?boolish nested) -> void
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
rbs-3.7.0.dev.1 sig/type_alias_dependency.rbs
rbs-3.6.1 sig/type_alias_dependency.rbs
rbs-3.6.0 sig/type_alias_dependency.rbs
rbs-3.6.0.pre.3 sig/type_alias_dependency.rbs
rbs-3.6.0.pre.2 sig/type_alias_dependency.rbs
rbs-3.6.0.pre.1 sig/type_alias_dependency.rbs
rbs-3.6.0.dev.1 sig/type_alias_dependency.rbs
rbs-3.5.3 sig/type_alias_dependency.rbs
rbs-3.5.2 sig/type_alias_dependency.rbs
rbs-3.5.1 sig/type_alias_dependency.rbs
rbs-3.5.1.pre.1 sig/type_alias_dependency.rbs
rbs-3.5.0 sig/type_alias_dependency.rbs
rbs-3.5.0.pre.2 sig/type_alias_dependency.rbs
rbs-3.5.0.pre.1 sig/type_alias_dependency.rbs
rbs-3.4.4 sig/type_alias_dependency.rbs
rbs-3.4.3 sig/type_alias_dependency.rbs
rbs-3.4.2 sig/type_alias_dependency.rbs
rbs-3.4.1 sig/type_alias_dependency.rbs
rbs-3.4.0 sig/type_alias_dependency.rbs
rbs-3.4.0.pre.1 sig/type_alias_dependency.rbs