UNPKG

@adaptabletools/adaptable

Version:

Powerful AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements

14 lines (13 loc) 351 B
export const runIfNotResolvedIn = async (promise, callback, delay = 100) => { let isFulfilled = false; promise?.then(() => { isFulfilled = true; }); (async () => { await new Promise((resolve) => setTimeout(resolve, delay)); if (!isFulfilled) { callback(); } })(); return promise; };