Sha256: b74f3f0ddc9f5f5169a9f296f138f98f1da701532f53bf77ebb23f422ad3a128

Contents?: true

Size: 1.17 KB

Versions: 32

Compression:

Stored size: 1.17 KB

Contents

module Steep
  module Interface
    class TypeParam
      type loc = RBS::Location[untyped, untyped]

      type variance = RBS::AST::TypeParam::variance

      attr_reader name: Symbol

      attr_reader upper_bound: AST::Types::t?

      attr_reader variance: variance

      attr_reader unchecked: bool

      attr_reader location: loc?

      def initialize: (name: Symbol, upper_bound: AST::Types::t?, variance: variance, unchecked: bool, ?location: loc?) -> void

      def ==: (untyped other) -> bool

      alias eql? ==

      def hash: () -> Integer

      # Rename the type parameters to fresh names
      #
      # Returns a pair of renamed type parameters and substitution.
      #
      # ```rb
      # TypeParam.rename([`X`, `Y`], [:X, :Y])  # [[`X(0)`, `Y(1)`], `{ X => X(0), Y => Y(1) }`]
      # ```
      #
      def self.rename: (Array[TypeParam] params, ?Array[Symbol] conflicting_names, ?Array[Symbol] new_names) -> [Array[TypeParam], Substitution]

      def to_s: () -> String

      def update: (?name: Symbol, ?upper_bound: AST::Types::t?, ?variance: variance, ?unchecked: bool, ?location: loc?) -> TypeParam

      def subst: (Substitution s) -> TypeParam
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
steep-1.4.0.dev.4 sig/steep/interface/type_param.rbs
steep-1.4.0.dev.3 sig/steep/interface/type_param.rbs
steep-1.3.2 sig/steep/interface/type_param.rbs
steep-1.3.1 sig/steep/interface/type_param.rbs
steep-1.4.0.dev.2 sig/steep/interface/type_param.rbs
steep-1.4.0.dev.1 sig/steep/interface/type_param.rbs
steep-1.3.0 sig/steep/interface/type_param.rbs
steep-1.3.0.pre.2 sig/steep/interface/type_param.rbs
steep-1.3.0.pre.1 sig/steep/interface/type_param.rbs
steep-1.2.1 sig/steep/interface/type_param.rbs
steep-1.2.0 sig/steep/interface/type_param.rbs
steep-1.2.0.pre.1 sig/steep/interface/type_param.rbs