ref/ electron remote deprecated
This commit is contained in:
@@ -2,7 +2,7 @@ import { Injectable } from '@angular/core';
|
|||||||
|
|
||||||
// If you import a module but never use any of the imported values other than as TypeScript types,
|
// If you import a module but never use any of the imported values other than as TypeScript types,
|
||||||
// the resulting javascript file will look as if you never imported the module at all.
|
// the resulting javascript file will look as if you never imported the module at all.
|
||||||
import { ipcRenderer, webFrame, remote } from 'electron';
|
import { ipcRenderer, webFrame } from 'electron';
|
||||||
import * as childProcess from 'child_process';
|
import * as childProcess from 'child_process';
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
|
|
||||||
@@ -12,7 +12,6 @@ import * as fs from 'fs';
|
|||||||
export class ElectronService {
|
export class ElectronService {
|
||||||
ipcRenderer: typeof ipcRenderer;
|
ipcRenderer: typeof ipcRenderer;
|
||||||
webFrame: typeof webFrame;
|
webFrame: typeof webFrame;
|
||||||
remote: typeof remote;
|
|
||||||
childProcess: typeof childProcess;
|
childProcess: typeof childProcess;
|
||||||
fs: typeof fs;
|
fs: typeof fs;
|
||||||
|
|
||||||
@@ -25,7 +24,6 @@ export class ElectronService {
|
|||||||
if (this.isElectron) {
|
if (this.isElectron) {
|
||||||
this.ipcRenderer = window.require('electron').ipcRenderer;
|
this.ipcRenderer = window.require('electron').ipcRenderer;
|
||||||
this.webFrame = window.require('electron').webFrame;
|
this.webFrame = window.require('electron').webFrame;
|
||||||
this.remote = window.require('electron').remote;
|
|
||||||
|
|
||||||
this.childProcess = window.require('child_process');
|
this.childProcess = window.require('child_process');
|
||||||
this.fs = window.require('fs');
|
this.fs = window.require('fs');
|
||||||
|
|||||||
Reference in New Issue
Block a user