mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
feat: promisify win.capturePage() (#15743)
* feat: promisify win.capturePage * mark optional arg correctly * Add to breaking changes doc * properly deprecate win.capturePage * remove change from api-contract * document both callback and promise versions * address docs feedback * update promisification progress doc
This commit is contained in:
@@ -68,8 +68,8 @@ const deprecate = {
|
||||
},
|
||||
|
||||
promisify: (promise, cb) => {
|
||||
const oldName = `${promise.name} with callbacks`
|
||||
const newName = `${promise.name} with Promises`
|
||||
const oldName = `function with callbacks`
|
||||
const newName = `function with Promises`
|
||||
const warn = warnOnce(oldName, newName)
|
||||
|
||||
if (typeof cb !== 'function') return promise
|
||||
|
||||
Reference in New Issue
Block a user