diff --git a/packages/core/src/lib/connection_manager.ts b/packages/core/src/lib/connection_manager.ts index e0ba8188c7..21118e0e13 100644 --- a/packages/core/src/lib/connection_manager.ts +++ b/packages/core/src/lib/connection_manager.ts @@ -103,7 +103,8 @@ export class ConnectionManager { this.dialAttemptsForPeer.delete(peerId.toString()); return; - } catch (error: any) { + } catch (e) { + const error = e as AggregateError; this.dialErrorsForPeer.set(peerId.toString(), error); log(`Error dialing peer ${peerId.toString()} - ${error.errors}`); diff --git a/tsconfig.json b/tsconfig.json index 2a8d6a19a9..073c567c6f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,9 +1,9 @@ { "compilerOptions": { "incremental": true, - "target": "es2020", + "target": "ES2022", "moduleResolution": "node16", - "module": "es2020", + "module": "ES2022", "declaration": true, "sourceMap": true, "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, @@ -38,7 +38,7 @@ // "experimentalDecorators": true /* Enables experimental support for ES7 decorators. */, // "emitDecoratorMetadata": true /* Enables experimental support for emitting type metadata for decorators. */, - "lib": ["es2020", "dom"], + "lib": ["es2022", "dom"], "types": ["node", "mocha"], "typeRoots": ["node_modules/@types"] },