UNPKG

1.75 kBMarkdownView Raw
1# Installation
2> `npm install --save @types/fb-watchman`
3
4# Summary
5This package contains type definitions for fb-watchman (https://facebook.github.io/watchman/).
6
7# Details
8Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fb-watchman.
9## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fb-watchman/index.d.ts)
10````ts
11// Type definitions for fb-watchman 2.0
12// Project: https://facebook.github.io/watchman/
13// Definitions by: Wu Haotian <https://github.com/whtsky>
14// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
15
16import { EventEmitter } from "events";
17
18// Emit the responses to these when they get sent down to us
19export type UnilateralTags = "unilateralTags" | "log";
20
21export interface ClientOptions {
22 /**
23 * Absolute path to the watchman binary.
24 * If not provided, the Client locates the binary using the PATH specified
25 * by the node child_process's default env.
26 */
27 watchmanBinaryPath?: string | undefined;
28}
29
30export interface Capabilities {
31 optional: any[];
32 required: any[];
33}
34
35export type doneCallback = (error?: Error | null, resp?: any) => any;
36
37export class Client extends EventEmitter {
38 constructor(options?: ClientOptions);
39 sendNextCommand(): void;
40 cancelCommands(why: string): void;
41 connect(): void;
42 command(args: any, done: doneCallback): void;
43 capabilityCheck(
44 caps: Capabilities,
45 done: doneCallback,
46 ): void;
47 end(): void;
48}
49
50````
51
52### Additional Details
53 * Last updated: Thu, 14 Sep 2023 15:26:41 GMT
54 * Dependencies: none
55 * Global values: none
56
57# Credits
58These definitions were written by [Wu Haotian](https://github.com/whtsky).
59
\No newline at end of file