Closed jaysson closed 6 years ago
Can you elaborate a bit on your needs? The console already replaces Promise handles returned by functions with resolutions, which is quite similar to what await
does. Perhaps you have a more complex use case?
Example of Promise resolution,
loopback > w = Widget.create({ name: 'myWidget01', description: 'My new Widget'})
{ name: 'myWidget01', description: 'My new Widget', id: 1 }
loopback > Widget.count()
1
Is it possible to wrap the console prompt in an async IIFE, so that we can use await inside?