class Rbs2ts::Converter::Types::Union
Public Instance Methods
to_ts()
click to toggle source
# File lib/rbs2ts/converter/types.rb, line 106 def to_ts types_ts = type.types.map { |type| ts = Types::Resolver.to_ts(type) type.is_a?(::RBS::Types::Optional) ? "(#{ts})" : ts } types_ts.join(' | ') end