diff --git a/javascript/src/utils/polling.ts b/javascript/src/utils/polling.ts index 116b3ba..08d8f6a 100644 --- a/javascript/src/utils/polling.ts +++ b/javascript/src/utils/polling.ts @@ -6,7 +6,8 @@ const CONNECTION_ERROR_RETRY_MAX_MS = 1000 * 60 * 10 // 10 minutes function sleep(ms: number): Promise { return new Promise((resolve) => { - setTimeout(resolve, ms) + const timeout = setTimeout(resolve, ms) + timeout.unref() }) } diff --git a/javascript/tsconfig.json b/javascript/tsconfig.json index 6af1a6e..746c845 100644 --- a/javascript/tsconfig.json +++ b/javascript/tsconfig.json @@ -11,7 +11,8 @@ /* Additional Checks */ "skipLibCheck": true, "esModuleInterop": true, - "allowSyntheticDefaultImports": true + "allowSyntheticDefaultImports": true, + "lib": ["ESNext"] }, "ts-node": { // these options are overrides used only by ts-node