refactor: Port getRemote to TypeScript (#16938)
* chore: make aliasify work on .ts files as well * refactor: Port getRemote to TypeScript * refactor: Implement feedback <3
This commit is contained in:
parent
6cd75744ef
commit
31494dfade
2 changed files with 3 additions and 5 deletions
|
@ -69,7 +69,7 @@ filenames = {
|
|||
"lib/renderer/inspector.js",
|
||||
"lib/renderer/ipc-renderer-internal-utils.ts",
|
||||
"lib/renderer/ipc-renderer-internal.js",
|
||||
"lib/renderer/remote.js",
|
||||
"lib/renderer/remote.ts",
|
||||
"lib/renderer/security-warnings.js",
|
||||
"lib/renderer/web-frame-init.js",
|
||||
"lib/renderer/window-setup.ts",
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
'use strict'
|
||||
import { remote } from 'electron'
|
||||
|
||||
const { remote } = require('electron')
|
||||
|
||||
exports.getRemote = function (name) {
|
||||
export function getRemote (name: keyof Electron.Remote) {
|
||||
if (!remote) {
|
||||
throw new Error(`${name} requires remote, which is not enabled`)
|
||||
}
|
Loading…
Reference in a new issue