@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 696 B
JavaScript
/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
*/
import{makeHandle as e}from"../../core/handleUtils.js";import"../../core/has.js";const t=new Set;function n(e){t.add(e),e.finally((()=>t.delete(e)))}function r(){return t.size>0}const i=new Map;function o(t){return e()}function s(){const e=Array.from(i.values())[0],t=i.size;if(i.clear(),0!==t)throw new Error(`Still ${t} alive widget instances.${e?` For example:\n${e}`:" Set enableLiveTracing in esri/widgets/support/tests.ts to include a stack trace."}`)}export{s as assertNoAlive,r as hasPendingLoading,o as registerAlive,n as registerLoading};