index.es.js.flow 1.0 KB

123456789101112131415161718192021
  1. // @flow
  2. import type { Time, Disposable, Sink } from '@most/types'
  3. declare export function disposeNone (): Disposable
  4. declare export function disposeWith <R> (dispose: (R) => void, resource: R): Disposable
  5. declare export function disposeWith <R> (dispose: (R) => void): (resource: R) => Disposable
  6. declare export function disposeOnce (d: Disposable): Disposable
  7. declare export function disposeBoth (d1: Disposable, d2: Disposable): Disposable
  8. declare export function disposeBoth (d1: Disposable): (d2: Disposable) => Disposable
  9. declare export function disposeAll (ds: Array<Disposable>): Disposable
  10. declare export function dispose (d: Disposable): void
  11. declare export function tryDispose (t: Time, disposable: Disposable, sink: Sink<any>): void
  12. declare export function tryDispose (t: Time): (disposable: Disposable, sink: Sink<any>) => void
  13. declare export function tryDispose (t: Time, disposable: Disposable): (sink: Sink<any>) => void
  14. declare export function tryDispose (t: Time): (disposable: Disposable) => (sink: Sink<any>) => void