refactor: don't expose deprecate as an internal module (#35311)
This commit is contained in:
parent
81766707fc
commit
8424779906
11 changed files with 149 additions and 174 deletions
21
typings/internal-electron.d.ts
vendored
21
typings/internal-electron.d.ts
vendored
|
@ -147,12 +147,6 @@ declare namespace Electron {
|
|||
_throw(error: Error | string): void;
|
||||
}
|
||||
|
||||
const deprecate: ElectronInternal.DeprecationUtil;
|
||||
|
||||
namespace Main {
|
||||
const deprecate: ElectronInternal.DeprecationUtil;
|
||||
}
|
||||
|
||||
class View {}
|
||||
|
||||
// Experimental views API
|
||||
|
@ -193,21 +187,6 @@ declare namespace Electron {
|
|||
}
|
||||
|
||||
declare namespace ElectronInternal {
|
||||
type DeprecationHandler = (message: string) => void;
|
||||
interface DeprecationUtil {
|
||||
warnOnce(oldName: string, newName?: string): () => void;
|
||||
setHandler(handler: DeprecationHandler | null): void;
|
||||
getHandler(): DeprecationHandler | null;
|
||||
warn(oldName: string, newName: string): void;
|
||||
log(message: string): void;
|
||||
removeFunction<T extends Function>(fn: T, removedName: string): T;
|
||||
renameFunction<T extends Function>(fn: T, newName: string): T;
|
||||
event(emitter: NodeJS.EventEmitter, oldName: string, newName: string): void;
|
||||
removeProperty<T, K extends (keyof T & string)>(object: T, propertyName: K, onlyForValues?: any[]): T;
|
||||
renameProperty<T, K extends (keyof T & string)>(object: T, oldName: string, newName: K): T;
|
||||
moveAPI<T extends Function>(fn: T, oldUsage: string, newUsage: string): T;
|
||||
}
|
||||
|
||||
interface DesktopCapturer {
|
||||
startHandling(captureWindow: boolean, captureScreen: boolean, thumbnailSize: Electron.Size, fetchWindowIcons: boolean): void;
|
||||
_onerror?: (error: string) => void;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue