   prepareType: (data) ->
     return unless data.type
     type = data.type.replace(/->/g, ':').replace('<top>', 'window')
-    if !type.endsWith(')') or type.match(/\(\)$/)
-      type = type.replace(/( : .+)/, '')
-    type = type.replace(/^fn\(/, '').replace(/\)$/, '')
 
   formatTypeCompletion: (obj) ->
     if obj.isKeyword

      else
        obj.leftLabel = obj.type.replace(/fn\(.{0,}\)/, '').replace(' : ', '')

    if !obj.type.endsWith(')') or obj.type.match(/\(\)$/)
      obj.rightLabel = obj.type.replace(/( : .+)/, '')
    else
      obj.rightLabel = obj.type

    if obj.rightLabel.startsWith('fn')
      if atom.config.get('atom-ternjs.useSnippets')
        params = @extractParams(obj.rightLabel.replace(/^fn\(/, '').replace(/\)$/, ''))
        obj._snippet = @buildSnippet(params, obj.name)
      else
        obj._snippet = "#{obj.name}"

    if obj.type is 'string'
      obj.name = obj.name?.replace /(^"|"$)/g, ''

    obj.type = obj.rightLabel = @prepareType(obj)

    if obj.type.replace(/fn\(.+\)/, '').length is 0
      obj.leftLabel = ''
