Shouldn't await using
early throw for non-disposable objects?
#208
Labels
normative
Indicates a normative change to the specification
In #180, the
[Symbol.dispose]
method is wrapped when hint is 'async-dispose', even if the method isundefined
. This bypasses the outer check in CreateDisposableResource, where it would typically trigger a TypeError forundefined
method. I find this behavior unexpected, as the original issue #179 did not intend to alter the behavior ofawait using
/AsyncDisposableStack.use
in a way that it would no longer throw errors for non-disposable values before usage but only when disposing.The text was updated successfully, but these errors were encountered: