зеркало из https://github.com/electron/electron.git
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:
Родитель
6cd75744ef
Коммит
31494dfade
|
@ -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`)
|
||||
}
|
Загрузка…
Ссылка в новой задаче