deasync-promise icon indicating copy to clipboard operation
deasync-promise copied to clipboard

Crashes the repl

Open dandv opened this issue 7 years ago • 1 comments

I'm trying to use this module to work around a limitation in WebStorm: it doesn't allow top-level await.

aawait.mjs

import aawait from 'deasync-promise';

function sleep(ms) {
  return new Promise(resolve => setTimeout(resolve, ms));
}
debugger;
aawait(sleep(1000));

image

Note how the repl> prompt turns into debug>.

In WebStorm, this manifests through a SIGSEV:

image

dandv avatar Jan 13 '18 09:01 dandv

Hi, @dandv. Please, provide the following details to reproduce the bug: Steps to reproduce, Expected result, Actual result, Environment

jakwuh avatar Jan 13 '18 22:01 jakwuh