Consider migrating to ES2018 or later to avoid typescript generating emulation of forawait loop #551
constantind
started this conversation in
General
Replies: 1 comment 1 reply
-
Just a short update, we're on a brink of a next major version. Mainly because of #553. I reckon I'll pack a Node version bump too requiring at least the LTS at the time being (v20). |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi @enisdenjo
Due to es2017 https://github.com/enisdenjo/graphql-ws/blob/master/tsconfig.json#L4 typescript generates emulation with try/catch/finally in the final js file for this code: https://github.com/enisdenjo/graphql-ws/blob/master/src/server.ts#L819
Instead this should be expected to utilize the native for await as is:
for await (const result of operationResult)
Currently with npm install unable to force es2022, any possible workarounds or add support for es2018?
Thank you
Beta Was this translation helpful? Give feedback.
All reactions