We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4373739 commit 07b2b66Copy full SHA for 07b2b66
local-tests/setup/tinny-utils.ts
@@ -54,7 +54,10 @@ export function randomSolanaPrivateKey() {
54
* @param ms - The timeout duration in milliseconds.
55
* @returns A new promise that resolves or rejects based on the original promise or the timeout.
56
*/
57
-export function withTimeout<T>(promise: Promise<T>, ms: number): Promise<T> {
+export function withTimeout<T>(
58
+ promise: Promise<T>,
59
+ ms: number
60
+): Promise<T | void> {
61
const timeout = new Promise<T>((_, reject) =>
62
setTimeout(() => reject(new Error('Timed out')), ms)
63
);
0 commit comments