class Rbs2ts::Converter::Types::ClassInstance

Public Instance Methods

to_ts() click to toggle source
# File lib/rbs2ts/converter/types.rb, line 128
def to_ts
  case type.name.to_s
  when 'Array' then
    Types::Array.new(type).to_ts
  when 'String' then
    Types::String.new(type).to_ts
  when 'Numeric', 'Integer', 'Float' then
    Types::Integer.new(type).to_ts
  when 'Bool' then
    Types::Bool.new(type).to_ts
  else
    Converter::Helper.convert_name(type.name.name)
  end
end