feat: promisify executeJavaScript (#17312)

This commit is contained in:
Milan Burda 2019-03-14 20:08:54 +01:00 committed by Shelley Vohr
parent 878538f2e8
commit 2e89348541
14 changed files with 164 additions and 100 deletions

View file

@ -94,10 +94,12 @@ const deprecate: ElectronInternal.DeprecationUtil = {
process.nextTick(() => {
cb!.length === 2 ? cb!(null, res) : cb!(res)
})
return res
}, (err: Error) => {
process.nextTick(() => {
cb!.length === 2 ? cb!(err) : cb!()
})
throw err
})
} as T
},