chore: refactor browser IPC into TS and app API into TS (#16921)
* 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
This commit is contained in:
parent
4ccd6d5900
commit
5790869a3f
16 changed files with 258 additions and 201 deletions
|
@ -2,6 +2,12 @@
|
|||
|
||||
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,
|
||||
|
@ -14,6 +20,6 @@ for (const {
|
|||
|
||||
Object.defineProperty(exports, name, {
|
||||
enumerable: !isPrivate,
|
||||
get: load
|
||||
get: () => handleESModule(load())
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue