async function runModuleDispose(id) {
  const state = REGISTERED_MODULES[id];
  if (!state) {
    return false;
  }
  if (state.isDeclined) {
    return false;
  }
  const disposeCallbacks = state.disposeCallbacks;
  state.disposeCallbacks = [];
  state.data = {};
  disposeCallbacks.map((callback) => callback());
  return true;
}
/** Called when a new module is loaded, to run cleanup on the old module (if needed) */
Called when a new module is loaded, to run cleanup on the old module (if needed)
Called when a new module is loaded to run cleanup on the old module ( if needed )
async function runModuleDispose(id) {
  const state = REGISTERED_MODULES[id];
  if (!state) {
    return false;
  }
  if (state.isDeclined) {
    return false;
  }
  const disposeCallbacks = state.disposeCallbacks;
  state.disposeCallbacks = [];
  state.data = {};
  disposeCallbacks.map((callback) => callback());
  return true;
}
async function runModuleDispose ( id ) { const state = REGISTERED_MODULES [ id ] ; if ( ! state ) { return false ; } if ( state . isDeclined ) { return false ; } const disposeCallbacks = state . disposeCallbacks ; state . disposeCallbacks = [ ] ; state . data = { } ; disposeCallbacks . map ( ( callback ) => callback ( ) ) ; return true ; }
Called when a new module is loaded, to run cleanup on the old module (if needed)
Called when a new module is loaded to run cleanup on the old module ( if needed )