class RBS::AST::Declarations::TypeAlias
Attributes
Public Class Methods
Source
# File bundled-src/rbs-3.10.0/lib/rbs/ast/declarations.rb, line 312 def initialize(name:, type_params:, type:, annotations:, location:, comment:) @name = name @type_params = type_params @type = type @annotations = annotations @location = location @comment = comment end
Public Instance Methods
Source
# File bundled-src/rbs-3.10.0/lib/rbs/ast/declarations.rb, line 321 def ==(other) other.is_a?(TypeAlias) && other.name == name && other.type_params == type_params && other.type == type end
Also aliased as: eql?
Source
# File bundled-src/rbs-3.10.0/lib/rbs/ast/declarations.rb, line 330 def hash self.class.hash ^ name.hash ^ type_params.hash ^ type.hash end
Source
# File bundled-src/rbs-3.10.0/lib/rbs/ast/declarations.rb, line 334 def to_json(state = _ = nil) { declaration: :alias, name: name, type_params: type_params, type: type, annotations: annotations, location: location, comment: comment }.to_json(state) end