Set prototype of constructor directly

This commit is contained in:
Cheng Zhao 2016-08-02 20:38:35 +09:00
parent 8c3232dc56
commit 844f32aa36
19 changed files with 84 additions and 158 deletions

View file

@ -1,6 +1,6 @@
const EventEmitter = require('events').EventEmitter
const autoUpdater = process.atomBinding('auto_updater').autoUpdater
const {autoUpdater, AutoUpdater} = process.atomBinding('auto_updater')
Object.setPrototypeOf(autoUpdater.__proto__, EventEmitter.prototype)
Object.setPrototypeOf(AutoUpdater.prototype, EventEmitter.prototype)
module.exports = autoUpdater