12 lines
201 B
JavaScript
12 lines
201 B
JavaScript
|
const {BrowserWindow} = require('electron')
|
||
|
|
||
|
class Foo {
|
||
|
set bar (value) {
|
||
|
if (!(value instanceof BrowserWindow)) {
|
||
|
throw new Error('setting error')
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
module.exports = new Foo()
|