mirror of
https://github.com/hanzonet/explore.git
synced 2026-10-30 18:16:57 +00:00
8 lines
198 B
TypeScript
8 lines
198 B
TypeScript
const scheduler = typeof setImmediate === 'function' ? setImmediate : setTimeout;
|
|
|
|
export default function flushPromises() {
|
|
return new Promise(function(resolve) {
|
|
scheduler(resolve);
|
|
});
|
|
}
|