chore: update ecmascript version (#1352)

* updates to ES2022

* 🚿 cleanup
This commit is contained in:
Stuart 2023-05-16 17:49:44 +09:00 committed by GitHub
parent a543d4ba71
commit 97d5659c47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -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}`);

View File

@ -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"]
},