Skip to content

Instantly share code, notes, and snippets.

@MoOx

MoOx/fb-watchman.js

Created May 24, 2017
Embed
What would you like to do?
fb-watchman flow interface
export type Watch = {}
export type CommandResponse = {
watch: Watch,
relative_path: string,
}
export type Subscription = {
expression: Array<string | [ string, string ]>,
fields: Array<string>,
relative_root: string,
}
export type WatchEvent = {
files: Array<Object>,
}
declare module "fb-watchman" {
declare class Client {
capabilityCheck(config: Object, callback: (error: any) => void): void;
command(config: ["watch-project", string], callback: (error: any, response: CommandResponse) => void): void;
command(config: ["subscribe", Watch, "files", Subscription], callback: (error: any) => void): void;
on(eventName: string, callback: (event: WatchEvent) => void): void;
end(): void;
}
}
@ellascott

This comment has been minimized.

Copy link

@ellascott ellascott commented Apr 11, 2018

Your article is very specific and detailed. It solved very quickly the problem I was having gmail login

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment