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:
Felix Rieseberg 2019-02-14 06:04:53 -08:00 коммит произвёл John Kleinschmidt
Родитель 6cd75744ef
Коммит 31494dfade
2 изменённых файлов: 3 добавлений и 5 удалений

Просмотреть файл

@ -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`)
}