Macros: SetTimeout() value problem

Hello again @huzedong2022 @pahetka

I have just found out that you can recalculate values with this method:
https://api.onlyoffice.com/plugin/macrosamples/recalculatevalues

For example, to display changed values in the macro of original poster you should add Api.asc_calculate(Asc.c_oAscCalculateType.All); like that:

function copier(){
    let workSheet = Api.GetActiveSheet();
    let copy = workSheet.GetRange("L2").GetValue();
    workSheet.GetRange("M2").SetValue(copy);
}

function resolveAfter2Seconds() {
  return new Promise(resolve => {
    setTimeout(() => {
      resolve('resolved');
    }, 2000);
  });
}

async function asyncCall() {
  let workSheet = Api.GetActiveSheet();
  console.log('calling');
  const result = await resolveAfter2Seconds();
  console.log(result);
  workSheet.GetRange("L2").SetValue(result);
  copier()
  Api.asc_calculate(Asc.c_oAscCalculateType.All);
}

asyncCall()

Sorry for not pointing to this method earlier.