Closed SpuriousGer closed 2 years ago
Hello,
Using await
directly is not yet supported, but you can return a Promise that contains an async function.
In other words, you can try this:
return new Promise(async function(resolve) {
const val = await fakeData.getLastGeneratedValue('asset_value');
resolve((Math.random() * val));
});
Awesome, thanks a lot
I want to use a value from a previous generator, but it is an asnyc operation.
This one is not working for me:
How can I get this implemented?