UNPKG

886 BTypeScriptView Raw
1/**
2 * The namespace for platform related utilities.
3 */
4export declare namespace Platform {
5 /**
6 * A flag indicating whether the platform is Mac.
7 */
8 const IS_MAC: boolean;
9 /**
10 * A flag indicating whether the platform is Windows.
11 */
12 const IS_WIN: boolean;
13 /**
14 * A flag indicating whether the browser is IE.
15 */
16 const IS_IE: boolean;
17 /**
18 * A flag indicating whether the browser is Edge.
19 */
20 const IS_EDGE: boolean;
21 /**
22 * Test whether the `accel` key is pressed.
23 *
24 * @param event - The keyboard or mouse event of interest.
25 *
26 * @returns Whether the `accel` key is pressed.
27 *
28 * #### Notes
29 * On Mac the `accel` key is the command key. On all other
30 * platforms the `accel` key is the control key.
31 */
32 function accelKey(event: KeyboardEvent | MouseEvent): boolean;
33}