Skip to content

Commit

Permalink
fix: allow top level await (#1196)
Browse files Browse the repository at this point in the history
Update TS config to use target/module "ES2022" to allow compiling .ts files that use top level await.

Depending on features used this can produce code incompatible with node 15 and below - see https://kangax.github.io/compat-table/es2016plus/ - we only officially support [Current and Active LTS](https://github.com/ipfs/community/blob/master/CONTRIBUTING_JS.md#supported-versions) (18/19 at the time of writing) so all good here I think.
  • Loading branch information
achingbrain authored Apr 27, 2023
1 parent abd1a33 commit e76b978
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/config/tsconfig.aegir.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"outDir": "dist",
"allowJs": true,
"checkJs": true,
"target": "ES2020",
"module": "ES2020",
"lib": ["ES2021", "ES2021.Promise", "ES2021.String", "ES2020.BigInt", "DOM", "DOM.Iterable", "WebWorker"],
"target": "ES2022",
"module": "ES2022",
"lib": ["ES2022", "DOM", "DOM.Iterable", "WebWorker"],
"noEmit": false,
"noEmitOnError": true,
"emitDeclarationOnly": false,
Expand Down

0 comments on commit e76b978

Please sign in to comment.