async function runModuleAccept(id) {
  const state = REGISTERED_MODULES[id];
  if (!state) {
    return false;
  }
  if (state.isDeclined) {
    return false;
  }
  const acceptCallbacks = state.acceptCallbacks;
  const updateID = Date.now();
  for (const {deps, callback: acceptCallback} of acceptCallbacks) {
    const [module, ...depModules] = await Promise.all([
      import(id + `?mtime=${updateID}`),
      ...deps.map((d) => import(d + `?mtime=${updateID}`)),
    ]);
    acceptCallback({module, deps: depModules});
  }
  return true;
}
/** Called when a new module is loaded, to pass the updated module to the "active" module */
Called when a new module is loaded, to pass the updated module to the "active" module
Called when a new module is loaded to pass the updated module to the " active " module
async function runModuleAccept(id) {
  const state = REGISTERED_MODULES[id];
  if (!state) {
    return false;
  }
  if (state.isDeclined) {
    return false;
  }
  const acceptCallbacks = state.acceptCallbacks;
  const updateID = Date.now();
  for (const {deps, callback: acceptCallback} of acceptCallbacks) {
    const [module, ...depModules] = await Promise.all([
      import(id + `?mtime=${updateID}`),
      ...deps.map((d) => import(d + `?mtime=${updateID}`)),
    ]);
    acceptCallback({module, deps: depModules});
  }
  return true;
}
async function runModuleAccept ( id ) { const state = REGISTERED_MODULES [ id ] ; if ( ! state ) { return false ; } if ( state . isDeclined ) { return false ; } const acceptCallbacks = state . acceptCallbacks ; const updateID = Date . now ( ) ; for ( const { deps , callback : acceptCallback } of acceptCallbacks ) { const [ module , ... depModules ] = await Promise . all ( [ import ( id + ` ${ updateID } ` ) , ... deps . map ( ( d ) => import ( d + ` ${ updateID } ` ) ) , ] ) ; acceptCallback ( { module , deps : depModules } ) ; } return true ; }
Called when a new module is loaded, to pass the updated module to the "active" module
Called when a new module is loaded to pass the updated module to the " active " module