Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Enhance

Manav Rathi8cdb31783b45
diff --git a/web/packages/shared/utils/index.ts b/web/packages/shared/utils/index.ts
index 1ed02fabee..c027b6cb62 100644
--- a/web/packages/shared/utils/index.ts
+++ b/web/packages/shared/utils/index.ts
@@ -1,7 +1,11 @@
-export async function sleep(time: number) {
- await new Promise((resolve) => {
- setTimeout(() => resolve(null), time);
- });
+/**
+ * Wait for {@link ms} milliseconds
+ *
+ * This function is a promisified `setTimeout`. It returns a promise that
+ * resolves after {@link ms} milliseconds.
+ */
+export async function sleep(ms: number) {
+ await new Promise((resolve) => setTimeout(resolve, ms));
}
export function downloadAsFile(filename: string, content: string) {