test: tsify deprecate spec (#20089)

This commit is contained in:
Jeremy Apthorp 2019-09-04 11:13:37 -07:00 committed by GitHub
parent 8cdfd30ba5
commit c29e4b096d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 42 additions and 40 deletions

View file

@ -83,12 +83,12 @@ declare namespace ElectronInternal {
type DeprecationHandler = (message: string) => void;
interface DeprecationUtil {
warnOnce(oldName: string, newName?: string): () => void;
setHandler(handler: DeprecationHandler): void;
setHandler(handler: DeprecationHandler | null): void;
getHandler(): DeprecationHandler | null;
warn(oldName: string, newName: string): void;
log(message: string): void;
removeFunction(fn: Function, removedName: string): Function;
renameFunction(fn: Function, newName: string): Function;
renameFunction(fn: Function, newName: string | Function): 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;