refactor: improve function deprecation module (#19012)
* add removeFunction to deprecation module * clarify deprecate api * throw error * change error msg
This commit is contained in:
parent
a90306876e
commit
d79e6bbffe
3 changed files with 18 additions and 5 deletions
3
typings/internal-electron.d.ts
vendored
3
typings/internal-electron.d.ts
vendored
|
@ -76,7 +76,8 @@ declare namespace ElectronInternal {
|
|||
getHandler(): DeprecationHandler | null;
|
||||
warn(oldName: string, newName: string): void;
|
||||
log(message: string): void;
|
||||
function(fn: Function, newName: string): Function;
|
||||
removeFunction(fn: Function, removedName: string): Function;
|
||||
renameFunction(fn: Function, newName: string): Function;
|
||||
event(emitter: NodeJS.EventEmitter, oldName: string, newName: string): void;
|
||||
fnToProperty(module: any, prop: string, getter: string, setter: string): void;
|
||||
removeProperty<T, K extends (keyof T & string)>(object: T, propertyName: K): T;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue