UNPKG

@yuebai008/cli

Version:

Command line interface for rapid qg-minigame development

1 lines 598 B
export class LiveLocationWithPool{#t;#o;#e;constructor(t,o){this.#t=t,this.#o=o,this.#o.add(this),this.#e=null}async update(){this.#t&&(this.#e?await this.#e.then((()=>this.update())):(this.#e=this.#t(this),await this.#e,this.#e=null))}async uiLocation(){throw"Not implemented"}dispose(){this.#o.delete(this),this.#t=null}isDisposed(){return!this.#o.has(this)}async isIgnoreListed(){throw"Not implemented"}}export class LiveLocationPool{#s;constructor(){this.#s=new Set}add(t){this.#s.add(t)}delete(t){this.#s.delete(t)}has(t){return this.#s.has(t)}disposeAll(){for(const t of this.#s)t.dispose()}}