forked from bencevans/screenshot-desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
34 lines (27 loc) · 1.2 KB
/
index.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
// Type definitions for screenshot-desktop 1.12
// Project: https://github.com/bencevans/screenshot-desktop
// Definitions by: Usama Ahsan <https://github.com/usama8800>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
export = akeyScreenshotDesktop;
declare function akeyScreenshotDesktop(options?: { format?: akeyScreenshotDesktop.ImageFormat, screen?: akeyScreenshotDesktop.DisplayID, displays: akeyScreenshotDesktop.Display[] }): Promise<Buffer>;
declare function akeyScreenshotDesktop(options?: { filename: string, format?: akeyScreenshotDesktop.ImageFormat, screen?: akeyScreenshotDesktop.DisplayID, displays: akeyScreenshotDesktop.Display[] }): Promise<string>;
declare namespace akeyScreenshotDesktop {
type DisplayID = number; // mac上DisplayId是number, windows是string
interface Display {
id: DisplayID,
name: string
}
type ImageFormat =
'bmp' |
'emf' |
'exif' |
'jpg' |
'jpeg' |
'gif' |
'png' |
'tiff' |
'wmf';
function listDisplays(): Promise<Array<{ id: DisplayID, name: string }>>;
function all(): Promise<Array<{ id: DisplayID, name: string }>>;
}