source: imaps-frontend/node_modules/@parcel/watcher/index.js.flow@ 0c6b92a

main
Last change on this file since 0c6b92a was 0c6b92a, checked in by stefan toskovski <stefantoska84@…>, 5 weeks ago

Pred finalna verzija

  • Property mode set to 100644
File size: 998 bytes
Line 
1// @flow
2declare type FilePath = string;
3declare type GlobPattern = string;
4
5export type BackendType =
6 | 'fs-events'
7 | 'watchman'
8 | 'inotify'
9 | 'windows'
10 | 'brute-force';
11export type EventType = 'create' | 'update' | 'delete';
12export interface Options {
13 ignore?: Array<FilePath | GlobPattern>,
14 backend?: BackendType
15}
16export type SubscribeCallback = (
17 err: ?Error,
18 events: Array<Event>
19) => mixed;
20export interface AsyncSubscription {
21 unsubscribe(): Promise<void>
22}
23export interface Event {
24 path: FilePath,
25 type: EventType
26}
27declare module.exports: {
28 getEventsSince(
29 dir: FilePath,
30 snapshot: FilePath,
31 opts?: Options
32 ): Promise<Array<Event>>,
33 subscribe(
34 dir: FilePath,
35 fn: SubscribeCallback,
36 opts?: Options
37 ): Promise<AsyncSubscription>,
38 unsubscribe(
39 dir: FilePath,
40 fn: SubscribeCallback,
41 opts?: Options
42 ): Promise<void>,
43 writeSnapshot(
44 dir: FilePath,
45 snapshot: FilePath,
46 opts?: Options
47 ): Promise<FilePath>
48}
Note: See TracBrowser for help on using the repository browser.