// @flow declare type FilePath = string; export type BackendType = | 'fs-events' | 'watchman' | 'inotify' | 'windows' | 'brute-force'; export type EventType = 'create' | 'update' | 'delete'; export interface Options { ignore?: Array, backend?: BackendType } export type SubscribeCallback = ( err: ?Error, events: Array ) => mixed; export interface AsyncSubscription { unsubscribe(): Promise } export interface Event { path: FilePath, type: EventType } declare module.exports: { getEventsSince( dir: FilePath, snapshot: FilePath, opts?: Options ): Promise>, subscribe( dir: FilePath, fn: SubscribeCallback, opts?: Options ): Promise, unsubscribe( dir: FilePath, fn: SubscribeCallback, opts?: Options ): Promise, writeSnapshot( dir: FilePath, snapshot: FilePath, opts?: Options ): Promise }