   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

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

    obj.type = obj.type?.replace(/->/g, ':').replace('<top>', 'window')

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


  extractParams: (type) ->
    return [] unless type
    start = type.indexOf('(') + 1
    params = []
    inside = 0
    for i in [start..type.length - 1]
      if type[i] is ':' and inside is -1
        params.push type.substring(start, i - 2)
        break
      if i is type.length - 1
        params.push type.substring(start, i)
        break
      if type[i] is ',' and inside is 0
        params.push type.substring(start, i)
