Skip to content

Commit

Permalink
remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
HerbCaudill committed Jan 22, 2024
1 parent f4ce137 commit 9c08f35
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions packages/automerge-repo/src/helpers/pause.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,4 @@
export const pause = (t = 0) =>
new Promise<void>(resolve => setTimeout(() => resolve(), t))

export function rejectOnTimeout<T>(
promise: Promise<T>,
millis: number
): Promise<T> {
return Promise.race([
promise,
pause(millis).then(() => {
throw new Error("timeout exceeded")
}),
])
}

/* c8 ignore end */

0 comments on commit 9c08f35

Please sign in to comment.