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
19
typings/internal-electron.d.ts
vendored
19
typings/internal-electron.d.ts
vendored
|
@ -26,4 +26,23 @@ declare namespace Electron {
|
|||
cause: SerializedError,
|
||||
__ELECTRON_SERIALIZED_ERROR__: true
|
||||
}
|
||||
|
||||
const deprecate: ElectronInternal.DeprecationUtil;
|
||||
}
|
||||
|
||||
declare namespace ElectronInternal {
|
||||
type DeprecationHandler = (message: string) => void;
|
||||
interface DeprecationUtil {
|
||||
setHandler(handler: DeprecationHandler): void;
|
||||
getHandler(): DeprecationHandler | null;
|
||||
warn(oldName: string, newName: string): void;
|
||||
log(message: string): void;
|
||||
function(fn: Function, newName: string): Function;
|
||||
event(emitter: NodeJS.EventEmitter, oldName: string, newName: string): void;
|
||||
removeProperty<T, K extends (keyof T & string)>(object: T, propertyName: K): T;
|
||||
renameProperty<T, K extends (keyof T & string)>(object: T, oldName: string, newName: K): T;
|
||||
|
||||
promisify<T extends (...args: any[]) => any>(fn: T): T;
|
||||
promisifyMultiArg<T extends (...args: any[]) => any>(fn: T): T;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue