 
 module.exports = (Main)->
   Subscription = null
+  SubscriptionChange = null
   WorkSpaceView = null
   TooltipInstance = null
   ActiveFile = null
   Errors = {}
+  RawErrors = []
   Decorations = []
   class TypeChecker
     @activate:->

        editor.buffer.onDidSave (info)=>
          ActiveFile = info.path
          @removeDecorations()
          @lint(editor)
    @deactivate:->
      return unless Main.Status.TypeChecker
      Subscription?.dispose()
      TooltipInstance?.remove()
      WorkSpaceView?.off 'click.atom-hack'
      Main.Status.TypeChecker = false

        Decorations.forEach (decoration)->
          try decoration.destroy()
        Decorations = []
    @lint:->
      Main.V.H.exec(['--json'],null,ActiveFile).then (result)=>
        result = JSON.parse(result.stderr)
        return if result.passed
        RawErrors = result.errors
        @errorRaw()
    @errorRaw:->
      editor = atom.workspace.getActiveEditor()
      WorkSpaceView?.off 'click.atom-hack'
      WorkSpaceView = atom.workspaceView.getActiveView()
      WorkSpaceView.on 'click.atom-hack',(e)=>
        cursors = editor.getCursorBufferPosition()
        return TooltipInstance?.remove() if typeof Errors[cursors.row+1] is 'undefined'
        current = null
        Errors[cursors.row+1].forEach (info)->
          if cursors.column >= info.start-1 and cursors.column <= info.end
            current = info
        return unless current?
        try
          @errorTooltip(current,cursors,e)
        catch error
          console.log error
      RawErrors.forEach (error)=>
        @errorProcess error.message,editor
    @errorTooltip:(error,cursors,e)->
      TooltipInstance?.remove()
      offset = WorkSpaceView.lineHeight * 0.7
