var r = null; Promise.resolve(7).then(x => { r = x + 1; }); __drain(); r