-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnode-webcam.d.ts
41 lines (34 loc) · 1.13 KB
/
node-webcam.d.ts
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
30
31
32
33
34
35
36
37
38
39
40
41
declare module 'node-webcam' {
type WebcamOptions = Partial<{
width: number,
height: number,
delay: number,
quality: number,
output: "jpeg" | "png",
device: Webcam | false,
callbackReturn: "location" | "buffer" | "base64",
verbose: boolean
}>;
interface Factory {
(): void,
create(options: WebcamOptions, type: NodeJS.Platform): Webcam,
Platform: string,
}
class Webcam {
constructor(options: Partial<WebcamOptions>);
create(options: WebcamOptions, type: NodeJS.Platform): Webcam;
Platform: string;
clone(): Webcam;
clear(): void;
capture(location: string | undefined, cb: (err: string | undefined, image: string | Buffer) => void): void;
}
class NodeWebcam {
version: string;
REVISION: number;
Factory: Webcam;
Webcam: Webcam;
static create(options: WebcamOptions): Webcam;
static capture(location: string, options: WebcamOptions, callback: (err: string | string[], data: string | Buffer) => void): void
}
export = NodeWebcam;
}