Closed BakaFT closed 8 months ago
You should wrap the callback inside a function to control non-/blocking without removing await
keyword, so there is no much code!
// add blocking callback
map.push(callback);
// add non-blocking callback
map.push(() => (callback(), void 0));
// trigger the callback
await callback();
Estimated about < 5 line changes for this feature.
fancy await
. working fine now.
export function init(context: PenguInitContext) {
// wait 5s after ember-libs init
context.rcp.postInit(
"rcp-fe-ember-libs",
async () => {
await new Promise(r => setTimeout(r, 5000));
},
true
)
}
should update beta docs later if merged.