base.js (508B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 /** 6 * Base class for conditions 7 */ 8 class ConditionBase { 9 constructor(factory, desc) { 10 this.factory = factory; 11 this.desc = desc; 12 } 13 14 async init() { 15 /* nothing to do */ 16 } 17 18 check() { 19 throw new Error("Check is not implemented!"); 20 } 21 } 22 23 globalThis.ConditionBase = ConditionBase;