chore: simplify promisify helper (#15952)
chore: simplify promisify helper
This commit is contained in:
parent
db2fda1b6f
commit
4b18a38e9f
4 changed files with 73 additions and 23 deletions
|
@ -40,10 +40,7 @@ Object.assign(app, {
|
|||
}
|
||||
})
|
||||
|
||||
const nativeGetFileIcon = app.getFileIcon
|
||||
app.getFileIcon = (path, options = {}, cb) => {
|
||||
return deprecate.promisify(nativeGetFileIcon.call(app, path, options), cb)
|
||||
}
|
||||
app.getFileIcon = deprecate.promisify(app.getFileIcon, 2)
|
||||
|
||||
const nativeAppMetrics = app.getAppMetrics
|
||||
app.getAppMetrics = () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue