Created
March 28, 2022 07:48
-
-
Save tobiu/72e517234478202f67f41deffe87ae8b to your computer and use it in GitHub Desktop.
Neo.ServiceWorker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Neo from '../src/Neo.mjs'; | |
import * as core from '../src/core/_export.mjs'; | |
import ServiceBase from '../src/worker/ServiceBase.mjs'; | |
/** | |
* @class Neo.ServiceWorker | |
* @extends Neo.worker.ServiceBase | |
* @singleton | |
*/ | |
class ServiceWorker extends ServiceBase { | |
/** | |
* @member {String} workerId='service' | |
* @protected | |
*/ | |
workerId = 'service' | |
static getConfig() {return { | |
/** | |
* @member {String} className='Neo.ServiceWorker' | |
* @protected | |
*/ | |
className: 'Neo.ServiceWorker', | |
/** | |
* @member {Boolean} singleton=true | |
* @protected | |
*/ | |
singleton: true | |
}} | |
} | |
Neo.applyClassConfig(ServiceWorker); | |
let instance = Neo.create(ServiceWorker); | |
Neo.applyToGlobalNs(instance); | |
export default instance; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment