mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +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);
|
|
});
|
|
}
|