electron/spec/fixtures/module/class.js

30 lines
334 B
JavaScript
Raw Normal View History

2016-03-25 20:03:49 +00:00
'use strict'
2016-02-22 04:13:26 +00:00
2016-03-25 20:03:49 +00:00
let value = 'old'
2016-02-22 04:13:26 +00:00
class BaseClass {
2016-03-25 20:03:49 +00:00
method () {
return 'method'
2016-02-22 04:13:26 +00:00
}
2016-03-25 20:03:49 +00:00
get readonly () {
return 'readonly'
2016-02-22 04:13:26 +00:00
}
2016-03-25 20:03:49 +00:00
get value () {
return value
2016-02-22 04:13:26 +00:00
}
2016-03-25 20:03:49 +00:00
set value (val) {
value = val
2016-02-22 04:13:26 +00:00
}
}
class DerivedClass extends BaseClass {
}
module.exports = {
base: new BaseClass,
derived: new DerivedClass,
}