this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 17 lines 399 B view raw
1// Times are in milliseconds 2export const delayShippingEstimate = 2000; 3export const delayRecommendedProducts = 5000; 4export const delayReviews = 6000; 5 6export async function withDelay<T>( 7 promise: Promise<T>, 8 delay: number, 9): Promise<T> { 10 // Ensure we throw if this throws 11 const ret = await promise; 12 return new Promise((resolve) => { 13 setTimeout(() => { 14 resolve(ret); 15 }, delay); 16 }); 17}