refactor: replace a few any-s with proper types (#25681)
This commit is contained in:
parent
603f9242d9
commit
fb11a12d5b
19 changed files with 170 additions and 53 deletions
|
@ -43,7 +43,7 @@ const deprecate: ElectronInternal.DeprecationUtil = {
|
|||
return function (this: any) {
|
||||
warn();
|
||||
fn.apply(this, arguments);
|
||||
};
|
||||
} as unknown as typeof fn;
|
||||
},
|
||||
|
||||
// change the name of a function
|
||||
|
@ -52,7 +52,7 @@ const deprecate: ElectronInternal.DeprecationUtil = {
|
|||
return function (this: any) {
|
||||
warn();
|
||||
return fn.apply(this, arguments);
|
||||
};
|
||||
} as unknown as typeof fn;
|
||||
},
|
||||
|
||||
moveAPI<T extends Function> (fn: T, oldUsage: string, newUsage: string): T {
|
||||
|
@ -60,7 +60,7 @@ const deprecate: ElectronInternal.DeprecationUtil = {
|
|||
return function (this: any) {
|
||||
warn();
|
||||
return fn.apply(this, arguments);
|
||||
} as any;
|
||||
} as unknown as typeof fn;
|
||||
},
|
||||
|
||||
// change the name of an event
|
||||
|
|
|
@ -34,7 +34,7 @@ const objectMap = function (source: Object, mapper: (value: any) => any) {
|
|||
return Object.fromEntries(targetEntries);
|
||||
};
|
||||
|
||||
function serializeNativeImage (image: any) {
|
||||
function serializeNativeImage (image: Electron.NativeImage) {
|
||||
const representations = [];
|
||||
const scaleFactors = image.getScaleFactors();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue