'use babel'

/* @flow */

import {Disposable} from 'atom'
import {Main} from './main'
import type {Provider} from './types'

module.exports = {
  config: {

  },
  activate() {
    this.instance = new Main()
  },
  deactivate() {
    this.instance.dispose()
  },
  provideIntentions(): Main {
    return this.instance
  },
  consumeProvider(provider: Provider) {
    const providers = [].concat(provider)
    providers.forEach(provider => {
      this.instance.addProvider(provider)
    })
    return new Disposable(() => {
      providers.forEach(provider => {
        this.instance.deleteProvider(provider)
      })
    })
  }
}

'use babel'

/* @flow */

import {Disposable} from 'atom'
import {Main} from './main'
import type {Provider} from './types'

module.exports = {
  config: {

  },
  activate() {
    this.instance = new Main()
  },
  deactivate() {
    this.instance.dispose()
  },
  provideIntentions(): Main {
    return this.instance
  },
  consumeProvider(provider: Provider): Disposable {
    const providers = [].concat(provider)
    providers.forEach(provider => {
      this.instance.addProvider(provider)
    })
    return new Disposable(() => {
      providers.forEach(provider => {
        this.instance.deleteProvider(provider)
      })
    })
  }
}

Add return type to consumer method
:art: Add return type to consumer method
