2019-02-06 18:27:20 +00:00
|
|
|
declare namespace NodeJS {
|
|
|
|
interface FeaturesBinding {
|
|
|
|
isDesktopCapturerEnabled(): boolean;
|
|
|
|
isOffscreenRenderingEnabled(): boolean;
|
|
|
|
isPDFViewerEnabled(): boolean;
|
|
|
|
isRunAsNodeEnabled(): boolean;
|
|
|
|
isFakeLocationProviderEnabled(): boolean;
|
|
|
|
isViewApiEnabled(): boolean;
|
|
|
|
isTtsEnabled(): boolean;
|
|
|
|
isPrintingEnabled(): boolean;
|
|
|
|
}
|
2019-02-12 14:22:33 +00:00
|
|
|
|
|
|
|
interface V8UtilBinding {
|
|
|
|
getHiddenValue<T>(obj: any, key: string): T;
|
|
|
|
setHiddenValue<T>(obj: any, key: string, value: T): void;
|
|
|
|
}
|
2019-02-06 18:27:20 +00:00
|
|
|
interface Process {
|
2019-02-12 14:22:33 +00:00
|
|
|
/**
|
|
|
|
* DO NOT USE DIRECTLY, USE process.atomBinding
|
|
|
|
*/
|
|
|
|
binding(name: string): any;
|
2019-02-06 18:27:20 +00:00
|
|
|
atomBinding(name: string): any;
|
|
|
|
atomBinding(name: 'features'): FeaturesBinding;
|
2019-02-12 14:22:33 +00:00
|
|
|
atomBinding(name: 'v8_util'): V8UtilBinding;
|
2019-02-14 22:29:20 +00:00
|
|
|
atomBinding(name: 'app'): { app: Electron.App, App: Function };
|
|
|
|
atomBinding(name: 'command_line'): Electron.CommandLine;
|
2019-02-06 18:27:20 +00:00
|
|
|
log: NodeJS.WriteStream['write'];
|
2019-02-12 14:22:33 +00:00
|
|
|
activateUvLoop(): void;
|
2019-02-18 12:47:07 +00:00
|
|
|
|
|
|
|
// Additional methods
|
|
|
|
getRenderProcessPreferences(): Array<Electron.RendererProcessPreference> | null;
|
|
|
|
|
|
|
|
// Additional events
|
|
|
|
once(event: 'document-start', listener: () => any): this;
|
|
|
|
once(event: 'document-end', listener: () => any): this;
|
2019-02-06 18:27:20 +00:00
|
|
|
}
|
|
|
|
}
|
2019-02-17 01:06:30 +00:00
|
|
|
|
2019-02-19 17:05:14 +00:00
|
|
|
declare module NodeJS {
|
|
|
|
interface Global {
|
|
|
|
require: NodeRequire;
|
|
|
|
module: NodeModule;
|
|
|
|
__filename: string;
|
|
|
|
__dirname: string;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-02-17 01:06:30 +00:00
|
|
|
declare interface Window {
|
2019-02-19 17:05:14 +00:00
|
|
|
ELECTRON_DISABLE_SECURITY_WARNINGS?: boolean;
|
|
|
|
ELECTRON_ENABLE_SECURITY_WARNINGS?: boolean;
|
2019-02-26 02:10:26 +00:00
|
|
|
InspectorFrontendHost?: {
|
|
|
|
showContextMenuAtPoint: (x: number, y: number, items: any[]) => void
|
|
|
|
};
|
|
|
|
DevToolsAPI?: {
|
|
|
|
contextMenuItemSelected: (id: number) => void;
|
|
|
|
contextMenuCleared: () => void
|
|
|
|
};
|
|
|
|
UI?: {
|
|
|
|
createFileSelectorElement: (callback: () => void) => HTMLSpanElement
|
|
|
|
};
|
|
|
|
Persistence?: {
|
|
|
|
FileSystemWorkspaceBinding: {
|
|
|
|
completeURL: (project: string, path: string) => string;
|
|
|
|
}
|
|
|
|
}
|
2019-02-17 01:06:30 +00:00
|
|
|
}
|