forked from dmitmel/ultimate-crosscode-typedefs
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnw.d.ts
53 lines (44 loc) · 1.42 KB
/
nw.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
42
43
44
45
46
47
48
49
50
51
52
53
// TypeScript definitions for nw.js 0.35.5
// based on https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/nw.js/index.d.ts
// undocumented fields and methods aren't defined here
/* eslint-disable @typescript-eslint/naming-convention */
/// <reference types="node" />
import * as types from './nw-types';
type NodeBuffer_ = typeof Buffer;
type NodeGlobal_ = typeof global;
type NodeProcess_ = typeof process;
type NodeRequire_ = typeof require;
type Node__dirname_ = typeof __dirname;
type Node__filename_ = typeof __filename;
export {};
declare global {
namespace NodeJS {
// https://nwjs.readthedocs.io/en/latest/References/Changes%20to%20Node/#process
interface ProcessVersions {
nw: string;
chromium: string;
'nw-flavor': 'sdk' | 'normal';
}
}
namespace nw {
let Buffer: NodeBuffer_;
let global: NodeGlobal_;
let process: NodeProcess_;
let require: NodeRequire_;
let __dirname: Node__dirname_;
let __filename: Node__filename_;
export import App = types.App;
export import Clipboard = types.Clipboard;
export import Tray = types.Tray;
export import Menu = types.Menu;
export import MenuItem = types.MenuItem;
export import Screen = types.Screen;
export import Shell = types.Shell;
export import Shortcut = types.Shortcut;
export import Window = types.Window;
}
}
/** @deprecated */
declare module 'nw.gui' {
export = nw;
}