5790869a3f
* chore: refactor browser IPC into typescript * chore: refactor app.ts into Typescript * Refactors app.dock into cpp * Removes app.launcher which has not existed for 3 years * Removes 2 deprecated APIs (that have been deprecated for more than one major) * Refactors deprecate.ts as well
25 lines
495 B
JavaScript
25 lines
495 B
JavaScript
'use strict'
|
|
|
|
const moduleList = require('@electron/internal/sandboxed_renderer/api/module-list')
|
|
|
|
const handleESModule = (m) => {
|
|
// Handle Typescript modules with an "export default X" statement
|
|
if (m.__esModule) return m.default
|
|
return m
|
|
}
|
|
|
|
for (const {
|
|
name,
|
|
load,
|
|
enabled = true,
|
|
private: isPrivate = false
|
|
} of moduleList) {
|
|
if (!enabled) {
|
|
continue
|
|
}
|
|
|
|
Object.defineProperty(exports, name, {
|
|
enumerable: !isPrivate,
|
|
get: () => handleESModule(load())
|
|
})
|
|
}
|