Skip to content

Commit 07b2b66

Browse files

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

local-tests/setup/tinny-utils.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@ export function randomSolanaPrivateKey() {
5454
* @param ms - The timeout duration in milliseconds.
5555
* @returns A new promise that resolves or rejects based on the original promise or the timeout.
5656
*/
57-
export function withTimeout<T>(promise: Promise<T>, ms: number): Promise<T> {
57+
export function withTimeout<T>(
58+
promise: Promise<T>,
59+
ms: number
60+
): Promise<T | void> {
5861
const timeout = new Promise<T>((_, reject) =>
5962
setTimeout(() => reject(new Error('Timed out')), ms)
6063
);

0 commit comments

Comments
 (0)