Open lionel-rowe opened 1 week ago
Seems like an SWC transpilation issue. I've put the reproduction code into their playground and the transpiled output matches exactly what we run in Deno. Running the transpiled output on its own inhibits the described error and the dispose hooks aren't called.
Filed an upstream issue here https://github.com/swc-project/swc/issues/9576
Version: Deno 1.46.3
I initially thought this was a bug with TS, but compiling TS via the playground and running it in Chrome works correctly, as does running it in Bun.
Using
using
within afor... of
loop fails to call theSymbol.dispose
method. The same problem occurs when using awaiting using usingawait using
usingSymbol.asyncDispose
:Keywords: using, using using, using await using, awaiting using await using