31494dfade
* chore: make aliasify work on .ts files as well * refactor: Port getRemote to TypeScript * refactor: Implement feedback <3
8 lines
207 B
TypeScript
8 lines
207 B
TypeScript
import { remote } from 'electron'
|
|
|
|
export function getRemote (name: keyof Electron.Remote) {
|
|
if (!remote) {
|
|
throw new Error(`${name} requires remote, which is not enabled`)
|
|
}
|
|
return remote[name]
|
|
}
|