class Rbs2ts::Converter::Types::Literal

Public Instance Methods

to_ts() click to toggle source
# File lib/rbs2ts/converter/types.rb, line 87
def to_ts
  case type.literal
  when ::String then
    "\"#{type.literal}\""
  when ::Integer, ::TrueClass, ::FalseClass then
    "#{type.literal}"
  else
    'unknown'
  end
end