UNPKG

603 BJavaScriptView Raw
1/**
2 * @license
3 * Copyright 2021 Google LLC
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6const t=async(t,s)=>{for await(const i of t)if(!1===await s(i))return};class s{constructor(t){this.U=t}disconnect(){this.U=void 0}reconnect(t){this.U=t}deref(){return this.U}}class i{constructor(){this.Y=void 0,this.q=void 0}get(){return this.Y}pause(){var t;null!==(t=this.Y)&&void 0!==t||(this.Y=new Promise((t=>this.q=t)))}resume(){var t;null===(t=this.q)||void 0===t||t.call(this),this.Y=this.q=void 0}}export{i as Pauser,s as PseudoWeakRef,t as forAwaitOf};
7//# sourceMappingURL=private-async-helpers.js.map