export default async function <T>(promise: Promise<T>, minDelayMs: number): Promise<T> {
  const [result] = await Promise.all([
    promise,
    new Promise(resolve => setTimeout(resolve, minDelayMs))
  ]);
  return result;
}
