forked from rescript-lang/rescript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxwatcher_util.mli
29 lines (19 loc) · 912 Bytes
/
xwatcher_util.mli
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
type lock
val makeLock : unit -> lock
class type _eventObj = object
method empty : unit -> unit
method needRebuild : unit -> bool
method push : string * string -> unit
method currentEvents : unit -> (string * string) array
end [@bs]
type eventObj = _eventObj Js.t
val makeEventObj : unit -> eventObj
val build : string -> eventObj -> lock -> (unit -> unit [@bs]) -> unit
val buildWithShell : string -> eventObj -> lock -> (unit -> unit [@bs]) -> unit
val findFile : prev:string -> cwd:string -> string -> string
val getWatchFiles : string -> Js.String.t Js.Array.t
type watcher = { dir : string ; watcher : Node.Fs.Watch.t }
val makeWatcher : string -> (string -> string -> unit [@bs]) -> watcher
external spawnInheritIgnore : string ->
(_ [@bs.as {json| [ ]|json}]) ->
(_ [@bs.as {json| { "stdio" : "inherit", "shell" : true }|json}]) -> unit = "spawn" [@@bs.module "child_process"]