i.e.:
require(['bootstraps/standard'])
.then(() => (
new Promise(resolve => setTimeout(() => resolve(), 500))
.then(() => console.log('foo')))
)
.then(() => console.log('bar'))
bar will fire before foo.
I'm happy to cast the promise using Promise.resolve, but can this be documented?
i.e.:
barwill fire beforefoo.I'm happy to cast the promise using
Promise.resolve, but can this be documented?